Merge pull request #5179 from vitor-k/reenable-hidapi

Reenable hidapi for SDL2.0.12 and up
This commit is contained in:
Ben 2020-04-27 16:35:51 +02:00 committed by GitHub
commit ed304e2877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -140,7 +140,7 @@ if (ENABLE_SDL2)
if (CITRA_USE_BUNDLED_SDL2) if (CITRA_USE_BUNDLED_SDL2)
# Detect toolchain and platform # Detect toolchain and platform
if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64) if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64)
set(SDL2_VER "SDL2-2.0.10") set(SDL2_VER "SDL2-2.0.12")
else() else()
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable CITRA_USE_BUNDLED_SDL2 and provide your own.") message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable CITRA_USE_BUNDLED_SDL2 and provide your own.")
endif() endif()

View File

@ -27,7 +27,7 @@ install:
- ps: | - ps: |
if ($env:BUILD_TYPE -eq 'mingw') { if ($env:BUILD_TYPE -eq 'mingw') {
$dependencies = "mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-ffmpeg" $dependencies = "mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-ffmpeg"
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-SDL2-2.0.10-1-any.pkg.tar.xz" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-SDL2-2.0.12-1-any.pkg.tar.xz"
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies"
# (HACK) ignore errors # (HACK) ignore errors
0 0

View File

@ -474,11 +474,10 @@ SDLState::SDLState() {
} }
// these hints are only defined on sdl2.0.9 or higher // these hints are only defined on sdl2.0.9 or higher
#if SDL_VERSION_ATLEAST(2, 0, 9) #if SDL_VERSION_ATLEAST(2, 0, 9)
// This can be set back to 1 when the compatibility problems with the controllers are #if !SDL_VERSION_ATLEAST(2, 0, 12)
// solved. There are also hints to toggle the individual drivers. // There are also hints to toggle the individual drivers if needed.
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI, "0"); 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 #endif
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4, "0");
#endif #endif
SDL_AddEventWatch(&SDLEventWatcher, this); SDL_AddEventWatch(&SDLEventWatcher, this);