mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 19:35:37 +00:00
configury, cmake: add check for endpointvolume.h :
add HAVE_ENDPOINTVOLUME_H, HAVE_MMDEVICEAPI_H and HAVE_AUDIOCLIENT_H in SDL_config.h.in, SDL_config.h.cmake, SDL_config_windows.h, and in SDL_config_winrt.h.
This commit is contained in:
parent
cf7460e477
commit
b11c75e9f4
|
@ -1212,6 +1212,11 @@ elseif(WINDOWS)
|
|||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
endif()
|
||||
|
||||
# headers needed elsewhere ...
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
|
||||
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_WINMM 1)
|
||||
file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c)
|
||||
|
@ -1224,10 +1229,6 @@ elseif(WINDOWS)
|
|||
set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES})
|
||||
endif()
|
||||
|
||||
# headers needed for WASAPI support:
|
||||
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
||||
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
||||
|
||||
if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H)
|
||||
set(SDL_AUDIO_DRIVER_WASAPI 1)
|
||||
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
|
||||
|
|
17
configure
vendored
17
configure
vendored
|
@ -23258,6 +23258,10 @@ if test "x$ac_cv_header_mmdeviceapi_h" = xyes; then :
|
|||
fi
|
||||
|
||||
|
||||
if test x$have_wasapi = xyes; then
|
||||
$as_echo "#define HAVE_MMDEVICEAPI_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "audioclient.h" "ac_cv_header_audioclient_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_audioclient_h" = xyes; then :
|
||||
|
||||
|
@ -23266,6 +23270,19 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if test x$have_wasapi = xyes; then
|
||||
$as_echo "#define HAVE_AUDIOCLIENT_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "endpointvolume.h" "ac_cv_header_endpointvolume_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_endpointvolume_h" = xyes; then :
|
||||
$as_echo "#define HAVE_ENDPOINTVOLUME_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-wasapi was given.
|
||||
if test "${enable_wasapi+set}" = set; then :
|
||||
enableval=$enable_wasapi;
|
||||
|
|
|
@ -3098,7 +3098,16 @@ XINPUT_STATE_EX s1;
|
|||
fi
|
||||
|
||||
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
|
||||
if test x$have_wasapi = xyes; then
|
||||
AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
|
||||
fi
|
||||
AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
|
||||
if test x$have_wasapi = xyes; then
|
||||
AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
|
||||
|
||||
AC_ARG_ENABLE(wasapi,
|
||||
AC_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
|
||||
, enable_wasapi=yes)
|
||||
|
|
|
@ -209,6 +209,11 @@
|
|||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
|
|
|
@ -209,6 +209,9 @@
|
|||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_ENDPOINTVOLUME_H
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
|
|
|
@ -97,6 +97,11 @@ typedef unsigned int uintptr_t;
|
|||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#define HAVE_XINPUT_H 1
|
||||
#endif
|
||||
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
|
|
Loading…
Reference in a new issue