Files @ r28403:d4cdcb69255f
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/FindXaudio2.cmake

Patric Stout
Fix: race-condition when quitting the game with libcurl (#11688)

There could be a callback in _new_http_callbacks that is not
processed yet. All callbacks in _http_callbacks were cancelled,
but not the ones in _new_http_callbacks
# Autodetect if xaudio2 can be used.

include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "")

check_cxx_source_compiles("
    #include <cstdio>
    #include <windows.h>

    #undef NTDDI_VERSION
    #undef _WIN32_WINNT

    #define NTDDI_VERSION    NTDDI_WIN8
    #define _WIN32_WINNT     _WIN32_WINNT_WIN8

    #include <xaudio2.h>
    int main() { printf(\"%s\\\\n\", XAUDIO2_DLL_A); return 0; }"
    XAUDIO2_FOUND
)