summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2022-04-18 03:31:07 -0700
committerShawn Hoffman <godisgovernment@gmail.com>2022-07-10 15:39:06 -0700
commitddf83462ac1139e76d6f0732ed83fe41fa9a9050 (patch)
tree3228c776b7575aac6433dd0529a76713a4f41ae0 /Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
parent655fb94e61f9edcb30d0370c801f7aee79a8811e (diff)
sdl: enable SDL_HINT_JOYSTICK_THREAD
fixes window message pumping
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
index 0aa36f82dc..4a08e27880 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
@@ -159,6 +159,11 @@ void Init()
EnableSDLLogging();
+#if SDL_VERSION_ATLEAST(2, 0, 14)
+ // This is required on windows so that SDL's joystick code properly pumps window messages
+ SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
+#endif
+
#if SDL_VERSION_ATLEAST(2, 0, 9)
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
#endif