From 83583dc49d5684645d93287aeeecc9ab472dd60c Mon Sep 17 00:00:00 2001
From: Cameron Gutman <[EMAIL REDACTED]>
Date: Sun, 19 Dec 2021 15:07:37 -0600
Subject: [PATCH] cmake: Fix WGI detection with older SDKs
---
CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84de4d1dbe2..93f8b3662f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1568,7 +1568,11 @@ elseif(WINDOWS)
#include <xinput.h>
XINPUT_STATE_EX s1;
int main(int argc, char **argv) { }" HAVE_XINPUT_STATE_EX)
- check_include_file(windows.gaming.input.h HAVE_WINDOWS_GAMING_INPUT_H)
+ check_c_source_compiles("
+ #define COBJMACROS
+ #include <windows.gaming.input.h>
+ __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics2 *s2;
+ int main(int argc, char **argv) { }" HAVE_WINDOWS_GAMING_INPUT_H)
endif()
# headers needed elsewhere