Fixed bug 4091 - Undefined references to Android audio functions when SDL_AUDIO_DISABLED is on
authorSam Lantinga <slouken@libsdl.org>
Sat, 24 Feb 2018 08:58:22 -0800
changeset 119000a7f9aec16a6
parent 11899 b74dda4daaa1
child 11901 e4d03d8733f3
Fixed bug 4091 - Undefined references to Android audio functions when SDL_AUDIO_DISABLED is on

Manuel Sabogal

If SDL is compiled with the Audio subsystem disabled there are some undefined references to the functions ANDROIDAUDIO_ResumeDevices and ANDROIDAUDIO_PauseDevices in the file src/video/android/SDL_androidevents.c.
src/video/android/SDL_androidevents.c
     1.1 --- a/src/video/android/SDL_androidevents.c	Sat Feb 24 08:42:04 2018 -0800
     1.2 +++ b/src/video/android/SDL_androidevents.c	Sat Feb 24 08:58:22 2018 -0800
     1.3 @@ -29,10 +29,15 @@
     1.4  #include "SDL_events.h"
     1.5  #include "SDL_androidwindow.h"
     1.6  
     1.7 +#if !SDL_AUDIO_DISABLED
     1.8  /* Can't include sysaudio "../../audio/android/SDL_androidaudio.h"
     1.9   * because of THIS redefinition */
    1.10  extern void ANDROIDAUDIO_ResumeDevices(void);
    1.11  extern void ANDROIDAUDIO_PauseDevices(void);
    1.12 +#else
    1.13 +static void ANDROIDAUDIO_ResumeDevices(void) {}
    1.14 +static void ANDROIDAUDIO_PauseDevices(void) {}
    1.15 +#endif
    1.16  
    1.17  static void 
    1.18  android_egl_context_restore()