Disable XINPUT before initing the joy subsystem

This commit is contained in:
mazmazz 2018-12-06 14:03:46 -05:00
parent 6694b7d679
commit 60afce5771

View file

@ -1380,13 +1380,12 @@ void I_InitJoystick(void)
if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0)
{
CONS_Printf("Initing joy system\n");
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1)
{
CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError());
return;
}
else
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
}
if (strcmp(cv_usejoystick.string, "0") && joy_open(cv_usejoystick.string) != -1)
@ -1412,13 +1411,12 @@ void I_InitJoystick2(void)
if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0)
{
CONS_Printf("Initing joy system\n");
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1)
{
CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError());
return;
}
else
SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE);
}
if (strcmp(cv_usejoystick2.string, "0") && joy_open2(cv_usejoystick2.string) != -1)