cmake: Fix MinGW build break in WGI joystick driver
Just look for windows.gaming.input.h rather than assuming its presence or absence based on other CMake variables. Fixes MinGW builds in CImain
parent
fba82ad1cb
commit
7e8469d196
|
@ -1534,6 +1534,7 @@ elseif(WINDOWS)
|
||||||
#include <xinput.h>
|
#include <xinput.h>
|
||||||
XINPUT_STATE_EX s1;
|
XINPUT_STATE_EX s1;
|
||||||
int main(int argc, char **argv) { }" HAVE_XINPUT_STATE_EX)
|
int main(int argc, char **argv) { }" HAVE_XINPUT_STATE_EX)
|
||||||
|
check_include_file(windows.gaming.input.h HAVE_WINDOWS_GAMING_INPUT_H)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# headers needed elsewhere
|
# headers needed elsewhere
|
||||||
|
@ -1712,8 +1713,7 @@ elseif(WINDOWS)
|
||||||
endif()
|
endif()
|
||||||
if(HAVE_XINPUT_H)
|
if(HAVE_XINPUT_H)
|
||||||
set(SDL_JOYSTICK_XINPUT 1)
|
set(SDL_JOYSTICK_XINPUT 1)
|
||||||
if(NOT CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION STREQUAL "")
|
if(HAVE_WINDOWS_GAMING_INPUT_H)
|
||||||
# Has Windows 10 SDK, so has Windows.Gaming.Input
|
|
||||||
set(SDL_JOYSTICK_WGI 1)
|
set(SDL_JOYSTICK_WGI 1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue