aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-02-15 16:25:53 -0800
committerGitHub <noreply@github.com>2021-02-15 16:25:53 -0800
commit0563f37708e10e25397a558173e11b2c5d658f96 (patch)
treec356d2bac37277e510635f0f4d5e6f6e88cce784 /src/input_common/sdl/sdl_impl.cpp
parent0b63701ebf46e77105d28c54ff9bb329970e35f0 (diff)
parent52df885a4200b7e1776e49491c7dbbef95b8535a (diff)
Merge pull request #3603 from FearlessTobi/port-5123
Port citra-emu/citra#5123: "SDL: Disable hidapi drivers due to compatibility problems with certain controllers"
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index f67de37e39..a88ae452fd 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -717,6 +717,13 @@ SDLState::SDLState() {
if (SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1") == SDL_FALSE) {
LOG_ERROR(Input, "Failed to set hint for background events with: {}", SDL_GetError());
}
+// these hints are only defined on sdl2.0.9 or higher
+#if SDL_VERSION_ATLEAST(2, 0, 9)
+#if !SDL_VERSION_ATLEAST(2, 0, 12)
+ // There are also hints to toggle the individual drivers if needed.
+ SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI, "0");
+#endif
+#endif
SDL_AddEventWatch(&SDLEventWatcher, this);