summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
authorGravatar Vitor Kiguchi2020-03-04 21:08:26 -0300
committerGravatar FearlessTobi2020-08-30 05:06:49 +0200
commite6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73 (patch)
tree502a2f5025aff2d056f8a2d254572f1081702ad5 /src/input_common/sdl/sdl_impl.cpp
parentMerge pull request #4604 from lioncash/lifetime (diff)
downloadyuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.gz
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.tar.xz
yuzu-e6f9fe1f60d555211dbbbf1b6cbf27008ba5ee73.zip
sdl_joystick: disable the use of the hidapi drivers due to many problems caused by them.
The main problem is the loss of compatibility with some controllers, but there are also unwanted changes to the behaviour of PS4 controllers (hardcoded lightbar color).
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 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() {
508 if (SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1") == SDL_FALSE) { 508 if (SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1") == SDL_FALSE) {
509 LOG_ERROR(Input, "Failed to set hint for background events with: {}", SDL_GetError()); 509 LOG_ERROR(Input, "Failed to set hint for background events with: {}", SDL_GetError());
510 } 510 }
511// these hints are only defined on sdl2.0.9 or higher
512#if SDL_VERSION_ATLEAST(2, 0, 9)
513#if !SDL_VERSION_ATLEAST(2, 0, 12)
514 // There are also hints to toggle the individual drivers if needed.
515 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI, "0");
516#endif
517#endif
511 518
512 SDL_AddEventWatch(&SDLEventWatcher, this); 519 SDL_AddEventWatch(&SDLEventWatcher, this);
513 520