summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/sdl_driver.cpp
diff options
context:
space:
mode:
authorGravatar Valeri2021-12-13 23:23:34 +0300
committerGravatar v19932021-12-14 15:02:03 +0300
commit7f965172c5cd4f891e1f2025050cbf9492dbf5c8 (patch)
tree132da0cf6ae98a3265ebbac15aafc753af43625e /src/input_common/drivers/sdl_driver.cpp
parentMerge pull request #7574 from v1993/patch-1 (diff)
downloadyuzu-7f965172c5cd4f891e1f2025050cbf9492dbf5c8.tar.gz
yuzu-7f965172c5cd4f891e1f2025050cbf9492dbf5c8.tar.xz
yuzu-7f965172c5cd4f891e1f2025050cbf9492dbf5c8.zip
input/SDL: Update SDL hints
SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED is no longer needed thanks to new default in SDL 2.0.18. SDL_HINT_JOYSTICK_HIDAPI_XBOX is reported to cause conflicts with native driver Xbox driver on Linux, and Xbox controllers don't benefit from hidapi anyways.
Diffstat (limited to 'src/input_common/drivers/sdl_driver.cpp')
-rw-r--r--src/input_common/drivers/sdl_driver.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp
index 1052ed394..24fd3ab92 100644
--- a/src/input_common/drivers/sdl_driver.cpp
+++ b/src/input_common/drivers/sdl_driver.cpp
@@ -403,10 +403,11 @@ SDLDriver::SDLDriver(const std::string& input_engine_) : InputEngine(input_engin
403 403
404 // Use hidapi driver for joycons. This will allow joycons to be detected as a GameController and 404 // Use hidapi driver for joycons. This will allow joycons to be detected as a GameController and
405 // not a generic one 405 // not a generic one
406 SDL_SetHint("SDL_JOYSTICK_HIDAPI_JOY_CONS", "1"); 406 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
407 407
408 // Turn off Pro controller home led 408 // Disable hidapi driver for xbox. Already default on Windows, this causes conflict with native
409 SDL_SetHint("SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED", "0"); 409 // driver on Linux.
410 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_XBOX, "0");
410 411
411 // If the frontend is going to manage the event loop, then we don't start one here 412 // If the frontend is going to manage the event loop, then we don't start one here
412 start_thread = SDL_WasInit(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) == 0; 413 start_thread = SDL_WasInit(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) == 0;