mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Add our custom controller mappings before init
This commit is contained in:
parent
9171992a9f
commit
c9cf1e4673
1 changed files with 12 additions and 12 deletions
|
|
@ -1164,6 +1164,18 @@ void I_StartupInput(void)
|
||||||
if (M_CheckParm("-nojoy"))
|
if (M_CheckParm("-nojoy"))
|
||||||
return;
|
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 (SDL_WasInit(SDL_INIT_GAMECONTROLLER))
|
if (SDL_WasInit(SDL_INIT_GAMECONTROLLER))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -1183,18 +1195,6 @@ void I_StartupInput(void)
|
||||||
return;
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Upon initialization, the gamecontroller subsystem will automatically dispatch controller device added events
|
// Upon initialization, the gamecontroller subsystem will automatically dispatch controller device added events
|
||||||
// for controllers connected before initialization.
|
// for controllers connected before initialization.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue