Merge pull request #5123 from vitor-k/disable-hidapi

SDL: Disable hidapi drivers due to compatibility problems with certain controllers
This commit is contained in:
Marshall Mohror 2020-04-03 23:23:03 -05:00 committed by GitHub
commit 3b1b8b7e1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -472,6 +472,14 @@ SDLState::SDLState() {
if (SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1") == SDL_FALSE) {
LOG_ERROR(Input, "Failed to set Hint for background events", SDL_GetError());
}
// these hints are only defined on sdl2.0.9 or higher
#if SDL_VERSION_ATLEAST(2, 0, 9)
// This can be set back to 1 when the compatibility problems with the controllers are
// solved. There are also hints to toggle the individual drivers.
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI, "0");
// This hint should probably stay as "0" as long as the hidapi PS4 led issue isn't fixed
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "0");
#endif
SDL_AddEventWatch(&SDLEventWatcher, this);