summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVitor Kiguchi <vitor-kiguchi@hotmail.com>2020-03-05 01:08:26 +0100
committerFearlessTobi <thm.frey@gmail.com>2020-08-30 05:06:49 +0200
commite6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73 (patch)
tree502a2f5025aff2d056f8a2d254572f1081702ad5 /src
parentMerge pull request #4604 from lioncash/lifetime (diff)
downloadyuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.gz
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.bz2
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.lz
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.xz
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.zst
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.zip
Diffstat (limited to 'src')
-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 c8d9eb2bc..e865a6831 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -508,6 +508,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);