Add support for using custom SDL2 mappings
This commit is contained in:
parent
1553224270
commit
de5434ea23
1 changed files with 12 additions and 0 deletions
|
|
@ -1294,6 +1294,18 @@ void I_InitJoystick(UINT8 index)
|
|||
if (M_CheckParm("-nojoy"))
|
||||
return;
|
||||
|
||||
{
|
||||
char dbpath[1024];
|
||||
sprintf(dbpath, "%s" PATHSEP "gamecontrollerdb.txt", srb2path);
|
||||
SDL_GameControllerAddMappingsFromFile(dbpath);
|
||||
}
|
||||
|
||||
{
|
||||
char dbpath[1024];
|
||||
sprintf(dbpath, "%s" PATHSEP "gamecontrollerdb_user.txt", srb2home);
|
||||
SDL_GameControllerAddMappingsFromFile(dbpath);
|
||||
}
|
||||
|
||||
if (M_CheckParm("-noxinput"))
|
||||
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue