cmake: set SDL_JOYSTICK_RAWINPUT for windows builds

Fixes: https://github.com/libsdl-org/SDL/issues/4412
This commit is contained in:
Ozkan Sezer 2021-07-10 10:01:40 +03:00
parent 24059a19c5
commit a809d62605
2 changed files with 4 additions and 0 deletions

View File

@ -1684,6 +1684,9 @@ elseif(WINDOWS)
if(HAVE_HIDAPI)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
endif()
if (NOT WINDOWS_STORE)
set(SDL_JOYSTICK_RAWINPUT 1)
endif
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
if(HAVE_DINPUT_H)

View File

@ -316,6 +316,7 @@
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
#cmakedefine SDL_HAVE_MACHINE_JOYSTICK_H @SDL_HAVE_MACHINE_JOYSTICK_H@
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_RAWINPUT @SDL_JOYSTICK_RAWINPUT@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
#cmakedefine SDL_JOYSTICK_VITA @SDL_JOYSTICK_VITA@