|
@@ -334,7 +334,7 @@ foreach(_SUB ${SDL_X11_OPTIONS})
|
|
|
endforeach()
|
|
|
set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
|
|
|
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
|
|
|
-dep_option(WASAPI "Use the Windows WASAPI audio driver" ON "DIRECTX" OFF)
|
|
|
+set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS})
|
|
|
set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
|
|
|
set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
|
|
|
dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
|
|
@@ -1200,8 +1200,6 @@ elseif(WINDOWS)
|
|
|
check_include_file(ddraw.h HAVE_DDRAW_H)
|
|
|
check_include_file(dsound.h HAVE_DSOUND_H)
|
|
|
check_include_file(dinput.h HAVE_DINPUT_H)
|
|
|
- check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
|
|
|
- check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
|
|
|
check_include_file(dxgi.h HAVE_DXGI_H)
|
|
|
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
|
|
|
set(HAVE_DIRECTX TRUE)
|
|
@@ -1226,6 +1224,10 @@ 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)
|