Fixed bug 3609 - Windows build fails due to conflicting types for 'XINPUT_GAMEPAD_EX'

Ozkan Sezer

(In reply to Ryan C. Gordon from comment #9)
> I've put this patch in as https://hg.libsdl.org/SDL/rev/7213ae46e870 ...can
> you verify this works on the latest MinGW?
>
> Thanks,
> --ryan.


This patch is wrong: the structure in question has nothing to do with any
gcc version in use.  I suggest reverting this adding a conigury check for
it, instead.  Something like the following should do it: (configure needs
regenerating.)
This commit is contained in:
Sam Lantinga
2017-07-10 18:31:28 -07:00
parent cd79d8ccec
commit 3c09265daf
7 changed files with 81 additions and 8 deletions

View File

@@ -35,6 +35,7 @@
#endif
#include <windows.h>
#include <basetyps.h> /* for REFIID with broken mingw.org headers */
/* Routines to convert from UTF8 to native Windows text */
#if UNICODE

View File

@@ -101,13 +101,7 @@
/* 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
#ifndef HAVE_XINPUT_GAMEPAD_EX
typedef struct
{
WORD wButtons;
@@ -121,7 +115,7 @@ typedef struct
} XINPUT_GAMEPAD_EX;
#endif
#ifndef HAS_XINPUT_STATE_EX
#ifndef HAVE_XINPUT_STATE_EX
typedef struct
{
DWORD dwPacketNumber;