Android: un-needed check of "isPausing" and minor typos
authorSylvain Becker <sylvain.becker@gmail.com>
Sat, 05 Jan 2019 22:46:52 +0100
changeset 1250631512aa74164
parent 12505 b5f8e6c420c2
child 12507 6a5107360fbc
Android: un-needed check of "isPausing" and minor typos
src/video/android/SDL_androidevents.c
     1.1 --- a/src/video/android/SDL_androidevents.c	Sat Jan 05 22:27:25 2019 +0100
     1.2 +++ b/src/video/android/SDL_androidevents.c	Sat Jan 05 22:46:52 2019 +0100
     1.3 @@ -39,9 +39,9 @@
     1.4  static void ANDROIDAUDIO_PauseDevices(void) {}
     1.5  #endif
     1.6  
     1.7 -/* Number of event types in the event queue */
     1.8 +/* Number of 'type' events in the event queue */
     1.9  static int
    1.10 -SDL_NumberOfEvent(Uint32 type)
    1.11 +SDL_NumberOfEvents(Uint32 type)
    1.12  {
    1.13      return SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, type, type);
    1.14  }
    1.15 @@ -86,7 +86,7 @@
    1.16      static int isPaused = 0;
    1.17      static int isPausing = 0;
    1.18  
    1.19 -    if (isPaused && !isPausing) {
    1.20 +    if (isPaused) {
    1.21  
    1.22          /* Make sure this is the last thing we do before pausing */
    1.23          SDL_LockMutex(Android_ActivityMutex);
    1.24 @@ -113,7 +113,7 @@
    1.25              /* We've been signaled to pause (potentially several times), but before we block ourselves,
    1.26               * we need to make sure that the very last event (of the first pause sequence, if several)
    1.27               * has reached the app */
    1.28 -            if (SDL_NumberOfEvent(SDL_APP_DIDENTERBACKGROUND) > SDL_SemValue(Android_PauseSem)) {
    1.29 +            if (SDL_NumberOfEvents(SDL_APP_DIDENTERBACKGROUND) > SDL_SemValue(Android_PauseSem)) {
    1.30                  isPausing = 1;
    1.31              }
    1.32              else {