android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
changeset 12511 0ef0e4cb7752
parent 12507 6a5107360fbc
child 12513 efddb8c5e161
     1.1 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Mon Jan 07 11:35:31 2019 +0100
     1.2 +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java	Mon Jan 07 17:06:50 2019 +0100
     1.3 @@ -386,8 +386,6 @@
     1.4  
     1.5          if (SDLActivity.mBrokenLibraries) {
     1.6             super.onDestroy();
     1.7 -           // Reset everything in case the user re opens the app
     1.8 -           SDLActivity.initialize();
     1.9             return;
    1.10          }
    1.11  
    1.12 @@ -405,15 +403,9 @@
    1.13              } catch(Exception e) {
    1.14                  Log.v(TAG, "Problem stopping thread: " + e);
    1.15              }
    1.16 -            SDLActivity.mSDLThread = null;
    1.17 -
    1.18 -            //Log.v(TAG, "Finished waiting for SDL thread");
    1.19          }
    1.20  
    1.21          super.onDestroy();
    1.22 -
    1.23 -        // Reset everything in case the user re opens the app
    1.24 -        SDLActivity.initialize();
    1.25      }
    1.26  
    1.27      @Override
    1.28 @@ -1711,12 +1703,12 @@
    1.29             return;
    1.30          }
    1.31  
    1.32 +        /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
    1.33 +        SDLActivity.onNativeSurfaceChanged();
    1.34 +
    1.35          /* Surface is ready */
    1.36          SDLActivity.mIsSurfaceReady = true;
    1.37  
    1.38 -        /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
    1.39 -        SDLActivity.onNativeSurfaceChanged();
    1.40 -
    1.41          SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED;
    1.42          SDLActivity.handleNativeState();
    1.43      }