mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 13:15:10 +00:00
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:
48
configure
vendored
48
configure
vendored
@@ -22687,6 +22687,44 @@ if test "x$ac_cv_header_xinput_h" = xyes; then :
|
||||
fi
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_GAMEPAD_EX x1;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_xinput_gamepadex=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
XINPUT_STATE_EX s1;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_xinput_stateex=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
if test x$have_ddraw = xyes; then
|
||||
|
||||
@@ -22712,6 +22750,16 @@ $as_echo "#define HAVE_DXGI_H 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define HAVE_XINPUT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_xinput_gamepadex = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_XINPUT_GAMEPAD_EX 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_xinput_stateex = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
SUMMARY_video="${SUMMARY_video} directx"
|
||||
|
||||
Reference in New Issue
Block a user