autotools: added windows.gaming.input.h (and SDL_JOYSTICK_WGI) detection
parent
2371b247ff
commit
802e17aad9
|
@ -24071,6 +24071,18 @@ $as_echo "#define HAVE_XINPUT_STATE_EX 1" >>confdefs.h
|
|||
fi
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "windows.gaming.input.h" "ac_cv_header_windows_gaming_input_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_windows_gaming_input_h" = xyes; then :
|
||||
have_wgi=yes
|
||||
fi
|
||||
|
||||
|
||||
if test x$have_wgi = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_WINDOWS_GAMING_INPUT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "mmdeviceapi.h" "ac_cv_header_mmdeviceapi_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_mmdeviceapi_h" = xyes; then :
|
||||
have_wasapi=yes
|
||||
|
@ -25238,11 +25250,16 @@ $as_echo "#define SDL_AUDIO_DRIVER_WASAPI 1" >>confdefs.h
|
|||
|
||||
$as_echo "#define SDL_JOYSTICK_RAWINPUT 1" >>confdefs.h
|
||||
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes -o x$have_wgi = xyes; then
|
||||
if test x$have_xinput = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_XINPUT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_wgi = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_WGI 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test x$have_dinput = xyes; then
|
||||
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -3199,6 +3199,11 @@ XINPUT_STATE_EX s1;
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(windows.gaming.input.h, have_wgi=yes)
|
||||
if test x$have_wgi = xyes; then
|
||||
AC_DEFINE(HAVE_WINDOWS_GAMING_INPUT_H, 1, [ ])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
|
||||
if test x$have_wasapi = xyes; then
|
||||
AC_DEFINE(HAVE_MMDEVICEAPI_H, 1, [ ])
|
||||
|
@ -3846,10 +3851,13 @@ case "$host" in
|
|||
# Set up files for the joystick library
|
||||
if test x$enable_joystick = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_RAWINPUT, 1, [ ])
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes -o x$have_wgi = xyes; then
|
||||
if test x$have_xinput = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_XINPUT, 1, [ ])
|
||||
fi
|
||||
if test x$have_wgi = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_WGI, 1, [ ])
|
||||
fi
|
||||
if test x$have_dinput = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_DINPUT, 1, [ ])
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
|
||||
|
|
|
@ -232,6 +232,7 @@
|
|||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_WINDOWS_GAMING_INPUT_H
|
||||
#undef HAVE_XINPUT_H
|
||||
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
|
@ -307,6 +308,7 @@
|
|||
#undef SDL_INPUT_WSCONS
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_WGI
|
||||
#undef SDL_JOYSTICK_XINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
|
|
Loading…
Reference in New Issue