Skip to content

Commit

Permalink
front: Fix issue with saving state twice on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
fzurita committed Aug 31, 2016
1 parent 1d2d650 commit b575a66
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/paulscode/android/mupen64plusae/game/GameActivity.java
Expand Up @@ -383,7 +383,11 @@ protected void onPause()

Log.i( "GameActivity", "onPause" );
mIsResumed = false;
tryPausing();

if(!mShuttingDown)
{
tryPausing();
}

if (mSensorController != null) {
mSensorController.onPause();
Expand Down Expand Up @@ -705,7 +709,6 @@ public void onExit(boolean shouldExit)
if(shouldExit)
{
mMogaController.exit();
mShuttingDown = true;
shutdownEmulator();
}
else if( !mDrawerLayout.isDrawerOpen( GravityCompat.START ))
Expand Down Expand Up @@ -915,6 +918,8 @@ private void tryRunning()

private void shutdownEmulator()
{
mShuttingDown = true;

CoreInterface.addOnStateCallbackListener( new CoreInterface.OnStateCallbackListener()
{
@Override
Expand Down

0 comments on commit b575a66

Please sign in to comment.