From 46bb7d3b88aefa5ebbc9cd8e9c7be8c58e10742b Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Thu, 24 Dec 2020 08:54:06 +0100 Subject: [PATCH] win: add [input] DisableXInput option to disable XInput and force DInput --- core/sdl/sdl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/sdl/sdl.cpp b/core/sdl/sdl.cpp index 6285712d1..ca788716e 100644 --- a/core/sdl/sdl.cpp +++ b/core/sdl/sdl.cpp @@ -62,6 +62,11 @@ void input_sdl_init() { // We want joystick events even if we loose focus SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); +#ifdef _WIN32 + if (cfgLoadBool("input", "DisableXInput", false)) + // Disable XInput for some old joytsicks + SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "0"); +#endif if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) die("SDL: error initializing Joystick subsystem");