1
0
Fork 1
forked from suyu/suyu

Merge pull request #3603 from FearlessTobi/port-5123

Port citra-emu/citra#5123: "SDL: Disable hidapi drivers due to compatibility problems with certain controllers"
This commit is contained in:
bunnei 2021-02-15 16:25:53 -08:00 committed by GitHub
commit 86212d4bcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -717,6 +717,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);