mirror of https://github.com/encounter/SDL.git
windows: Fix compiling of XInput code on newer MinGW installs.
Fixes Bugzilla #3609.
This commit is contained in:
parent
599d9ba198
commit
d844487799
|
@ -100,6 +100,14 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* typedef's for XInput structs we use */
|
/* typedef's for XInput structs we use */
|
||||||
|
|
||||||
|
/* Don't redeclare these on MinGW with gcc >= 5.0.2 */
|
||||||
|
#if defined(__MINGW32__) && (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= 50002)
|
||||||
|
#define HAS_XINPUT_GAMEPAD_EX
|
||||||
|
#define HAS_XINPUT_STATE_EX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_XINPUT_GAMEPAD_EX
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
WORD wButtons;
|
WORD wButtons;
|
||||||
|
@ -111,12 +119,15 @@ typedef struct
|
||||||
SHORT sThumbRY;
|
SHORT sThumbRY;
|
||||||
DWORD dwPaddingReserved;
|
DWORD dwPaddingReserved;
|
||||||
} XINPUT_GAMEPAD_EX;
|
} XINPUT_GAMEPAD_EX;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_XINPUT_STATE_EX
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
DWORD dwPacketNumber;
|
DWORD dwPacketNumber;
|
||||||
XINPUT_GAMEPAD_EX Gamepad;
|
XINPUT_GAMEPAD_EX Gamepad;
|
||||||
} XINPUT_STATE_EX;
|
} XINPUT_STATE_EX;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue