cmake: set SDL_JOYSTICK_RAWINPUT for windows builds Fixes: https://github.com/libsdl-org/SDL/issues/4412
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b95a4e..78b928d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 0b02cd7..40c5a7e 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -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@