mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 02:32:46 +01:00
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.
This commit is contained in:
parent
3592628302
commit
7f965172c5
1 changed files with 4 additions and 3 deletions
|
@ -403,10 +403,11 @@ SDLDriver::SDLDriver(const std::string& input_engine_) : InputEngine(input_engin
|
||||||
|
|
||||||
// Use hidapi driver for joycons. This will allow joycons to be detected as a GameController and
|
// Use hidapi driver for joycons. This will allow joycons to be detected as a GameController and
|
||||||
// not a generic one
|
// not a generic one
|
||||||
SDL_SetHint("SDL_JOYSTICK_HIDAPI_JOY_CONS", "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
|
||||||
|
|
||||||
// Turn off Pro controller home led
|
// Disable hidapi driver for xbox. Already default on Windows, this causes conflict with native
|
||||||
SDL_SetHint("SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED", "0");
|
// driver on Linux.
|
||||||
|
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_XBOX, "0");
|
||||||
|
|
||||||
// If the frontend is going to manage the event loop, then we don't start one here
|
// If the frontend is going to manage the event loop, then we don't start one here
|
||||||
start_thread = SDL_WasInit(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) == 0;
|
start_thread = SDL_WasInit(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) == 0;
|
||||||
|
|
Loading…
Reference in a new issue