From 399eddefe6ea5c243f02d28976b263dc0a129472 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Mon, 1 Sep 2014 00:43:01 +0000 Subject: [PATCH] SDL2: Do not use xinput, force directinput Fixes axes issue with xinput controllers. --- src/sdl/i_system.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index cfc2e210d..d3793b6da 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1519,6 +1519,7 @@ static int joy_open2(const char *fname) void I_InitJoystick(void) { I_ShutdownJoystick(); + SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); if (!strcmp(cv_usejoystick.string, "0") || M_CheckParm("-nojoy")) return; if (joy_open(cv_usejoystick.string) != -1) @@ -1534,6 +1535,7 @@ void I_InitJoystick(void) void I_InitJoystick2(void) { I_ShutdownJoystick2(); + SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); if (!strcmp(cv_usejoystick2.string, "0") || M_CheckParm("-nojoy")) return; if (joy_open2(cv_usejoystick2.string) != -1)