Let XAudio2 target be removed from the build by removing it from SDL_config.h
authorRyan C. Gordon
Mon, 22 Aug 2011 14:30:49 -0400
changeset 5634093e60544778
parent 5633 21a6e87905e3
child 5635 bef0f093c9da
Let XAudio2 target be removed from the build by removing it from SDL_config.h
src/audio/xaudio2/SDL_xaudio2.c
src/audio/xaudio2/SDL_xaudio2.h
     1.1 --- a/src/audio/xaudio2/SDL_xaudio2.c	Mon Aug 22 14:25:11 2011 -0400
     1.2 +++ b/src/audio/xaudio2/SDL_xaudio2.c	Mon Aug 22 14:30:49 2011 -0400
     1.3 @@ -27,7 +27,7 @@
     1.4  #define INITGUID 1
     1.5  #include "SDL_xaudio2.h"
     1.6  
     1.7 -#if SDL_HAVE_XAUDIO2_H
     1.8 +#ifdef SDL_HAVE_XAUDIO2_H
     1.9  
    1.10  static __inline__ char *
    1.11  utf16_to_utf8(const WCHAR *S)
     2.1 --- a/src/audio/xaudio2/SDL_xaudio2.h	Mon Aug 22 14:25:11 2011 -0400
     2.2 +++ b/src/audio/xaudio2/SDL_xaudio2.h	Mon Aug 22 14:30:49 2011 -0400
     2.3 @@ -25,15 +25,14 @@
     2.4  
     2.5  #include "../SDL_sysaudio.h"
     2.6  
     2.7 -/* XAudio2 is available as of the March 2008 DirectX SDK */
     2.8 -#include <dxsdkver.h>
     2.9 +#if SDL_AUDIO_DRIVER_XAUDIO2
    2.10 +#include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
    2.11  #if (defined(_DXSDK_BUILD_MAJOR) && (_DXSDK_BUILD_MAJOR >= 1284))
    2.12  #   define SDL_HAVE_XAUDIO2_H 1
    2.13 -#else
    2.14 -#   define SDL_HAVE_XAUDIO2_H 0
    2.15 +#endif
    2.16  #endif
    2.17  
    2.18 -#if SDL_HAVE_XAUDIO2_H
    2.19 +#ifdef SDL_HAVE_XAUDIO2_H
    2.20  #include <XAudio2.h>
    2.21  
    2.22  /* Hidden "this" pointer for the audio functions */