src/video/android/SDL_androidevents.c
changeset 12693 d311fcb8066a
parent 12562 d21956a01eed
child 12703 f6c7e5e03f60
     1.1 --- a/src/video/android/SDL_androidevents.c	Fri Apr 05 08:36:31 2019 +0200
     1.2 +++ b/src/video/android/SDL_androidevents.c	Fri Apr 05 09:16:30 2019 +0200
     1.3 @@ -22,9 +22,6 @@
     1.4  
     1.5  #if SDL_VIDEO_DRIVER_ANDROID
     1.6  
     1.7 -/* We're going to do this by default */
     1.8 -#define SDL_ANDROID_BLOCK_ON_PAUSE  1
     1.9 -
    1.10  #include "SDL_androidevents.h"
    1.11  #include "SDL_events.h"
    1.12  #include "SDL_androidkeyboard.h"
    1.13 @@ -49,14 +46,12 @@
    1.14  static void openslES_PauseDevices(void) {}
    1.15  #endif
    1.16  
    1.17 -#if SDL_ANDROID_BLOCK_ON_PAUSE
    1.18  /* Number of 'type' events in the event queue */
    1.19  static int
    1.20  SDL_NumberOfEvents(Uint32 type)
    1.21  {
    1.22      return SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, type, type);
    1.23  }
    1.24 -#endif /* SDL_ANDROID_BLOCK_ON_PAUSE */
    1.25  
    1.26  static void
    1.27  android_egl_context_restore(SDL_Window *window)
    1.28 @@ -89,15 +84,13 @@
    1.29  
    1.30  /*
    1.31   * Android_ResumeSem and Android_PauseSem are signaled from Java_org_libsdl_app_SDLActivity_nativePause and Java_org_libsdl_app_SDLActivity_nativeResume
    1.32 - * When the pause semaphore is signaled, if SDL_ANDROID_BLOCK_ON_PAUSE is defined the event loop will block until the resume signal is emitted.
    1.33 + * When the pause semaphore is signaled, if Android_PumpEvents_Blocking is used, the event loop will block until the resume signal is emitted.
    1.34   *
    1.35   * No polling necessary
    1.36   */
    1.37  
    1.38 -#if SDL_ANDROID_BLOCK_ON_PAUSE
    1.39 -
    1.40  void
    1.41 -Android_PumpEvents(_THIS)
    1.42 +Android_PumpEvents_Blocking(_THIS)
    1.43  {
    1.44      SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
    1.45  
    1.46 @@ -146,10 +139,8 @@
    1.47      }
    1.48  }
    1.49  
    1.50 -#else
    1.51 -
    1.52  void
    1.53 -Android_PumpEvents(_THIS)
    1.54 +Android_PumpEvents_NonBlocking(_THIS)
    1.55  {
    1.56      SDL_VideoData *videodata = (SDL_VideoData *)_this->driverdata;
    1.57  
    1.58 @@ -188,8 +179,6 @@
    1.59      }
    1.60  }
    1.61  
    1.62 -#endif /* SDL_ANDROID_BLOCK_ON_PAUSE */
    1.63 -
    1.64  #endif /* SDL_VIDEO_DRIVER_ANDROID */
    1.65  
    1.66  /* vi: set ts=4 sw=4 expandtab: */