From 69caf9188e4344cc6fe4612d0ab020d56227e91c Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 16 Feb 2021 02:16:24 +0100 Subject: [PATCH] early-access version 1466 --- README.md | 2 +- src/input_common/sdl/sdl_impl.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 70e54a835..034de9933 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1465. +This is the source code for early-access 1466. ## Legal Notice diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index f67de37e3..a88ae452f 100755 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -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);