Use XINPUT_STATE instead of XINPUT_STATE_EX (thanks Andrew!)

XINPUT_STATE_EX isn't actually a thing, we can just use the normal XINPUT_STATE

Fixes https://github.com/libsdl-org/SDL/issues/2797
This commit is contained in:
Sam Lantinga 2023-11-04 22:24:55 -07:00
parent aa129c9257
commit e8f4045d0b
8 changed files with 12 additions and 126 deletions

62
configure vendored
View file

@ -27619,77 +27619,15 @@ else $as_nop
fi
if test x$enable_xinput = xyes; then
have_xinput_gamepadex=no
have_xinput_stateex=no
ac_fn_c_check_header_compile "$LINENO" "xinput.h" "ac_cv_header_xinput_h" "$ac_includes_default"
if test "x$ac_cv_header_xinput_h" = xyes
then :
have_xinput=yes
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct XINPUT_GAMEPAD_EX" >&5
printf %s "checking for struct XINPUT_GAMEPAD_EX... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <windows.h>
#include <xinput.h>
XINPUT_GAMEPAD_EX x1;
int
main (void)
{
;
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.beam conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_xinput_gamepadex" >&5
printf "%s\n" "$have_xinput_gamepadex" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct XINPUT_STATE_EX" >&5
printf %s "checking for struct XINPUT_STATE_EX... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <windows.h>
#include <xinput.h>
XINPUT_STATE_EX s1;
int
main (void)
{
;
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.beam conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_xinput_stateex" >&5
printf "%s\n" "$have_xinput_stateex" >&6; }
if test x$have_xinput = xyes; then
printf "%s\n" "#define HAVE_XINPUT_H 1" >>confdefs.h
fi
if test x$have_xinput_gamepadex = xyes; then
printf "%s\n" "#define HAVE_XINPUT_GAMEPAD_EX 1" >>confdefs.h
fi
if test x$have_xinput_stateex = xyes; then
printf "%s\n" "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
fi
fi