Fixes Bug 2134 - [Android] Black screen after resume (sometimes)
authorGabriel Jacobo <gabomdq@gmail.com>
Thu, 10 Oct 2013 00:30:03 -0300
changeset 77956acc7df4a175
parent 7794 7995e0920bf9
child 7796 75c80f36038e
Fixes Bug 2134 - [Android] Black screen after resume (sometimes)
src/video/android/SDL_androidevents.c
     1.1 --- a/src/video/android/SDL_androidevents.c	Wed Oct 09 11:30:01 2013 -0300
     1.2 +++ b/src/video/android/SDL_androidevents.c	Thu Oct 10 00:30:03 2013 -0300
     1.3 @@ -72,6 +72,8 @@
     1.4  
     1.5  #if SDL_ANDROID_BLOCK_ON_PAUSE
     1.6      if (isPaused && !isPausing) {
     1.7 +        /* Make sure this is the last thing we do before pausing */
     1.8 +        android_egl_context_backup();
     1.9          if(SDL_SemWait(Android_ResumeSem) == 0) {
    1.10  #else
    1.11      if (isPaused) {
    1.12 @@ -92,7 +94,6 @@
    1.13                  isPausing = 1;
    1.14              }
    1.15              else {
    1.16 -                android_egl_context_backup();
    1.17                  isPausing = 0;
    1.18                  isPaused = 1;
    1.19              }