Browse Source

device: Fix XInput compile error compiling for newer Windows versions

rdb 3 years ago
parent
commit
5196719f29
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/device/xInputDevice.cxx

+ 1 - 1
panda/src/device/xInputDevice.cxx

@@ -70,7 +70,7 @@
 
 
 // With MingW32 this raises the error:
 // With MingW32 this raises the error:
 // Redefinition of '_XINPUT_BATTERY_INFORMATION'
 // Redefinition of '_XINPUT_BATTERY_INFORMATION'
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && _WIN32_WINNT < 0x0602
 typedef struct _XINPUT_BATTERY_INFORMATION {
 typedef struct _XINPUT_BATTERY_INFORMATION {
   BYTE BatteryType;
   BYTE BatteryType;
   BYTE BatteryLevel;
   BYTE BatteryLevel;