mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
in_sdl.c: IN_StartupJoystick: do SDL_INIT_GAMECONTROLLER before SDL_GameControllerAddMappingsFromFile, to match the sdl testgamecontroller tool
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1296 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
dfcaa52260
commit
f8ccd07420
1 changed files with 6 additions and 6 deletions
|
@ -283,6 +283,12 @@ void IN_StartupJoystick (void)
|
|||
if (COM_CheckParm("-nojoy"))
|
||||
return;
|
||||
|
||||
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1 )
|
||||
{
|
||||
Con_Warning("could not initialize SDL Game Controller\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// Load additional SDL2 controller definitions from gamecontrollerdb.txt
|
||||
q_snprintf (controllerdb, sizeof(controllerdb), "%s/gamecontrollerdb.txt", com_basedir);
|
||||
nummappings = SDL_GameControllerAddMappingsFromFile(controllerdb);
|
||||
|
@ -298,12 +304,6 @@ void IN_StartupJoystick (void)
|
|||
Con_Printf("%d mappings loaded from gamecontrollerdb.txt\n", nummappings);
|
||||
}
|
||||
|
||||
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1 )
|
||||
{
|
||||
Con_Warning("could not initialize SDL Game Controller\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < SDL_NumJoysticks(); i++)
|
||||
{
|
||||
const char *joyname = SDL_JoystickNameForIndex(i);
|
||||
|
|
Loading…
Reference in a new issue