Skip to content

Commit

Permalink
Always shut down audio, regardless of why the task is being destroyed…
Browse files Browse the repository at this point in the history
…. Might help #9771
  • Loading branch information
hrydgard committed Aug 8, 2017
1 parent cefb57d commit 7a3a620
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/src/org/ppsspp/ppsspp/NativeActivity.java
Expand Up @@ -91,6 +91,9 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback {
private Vibrator vibrator; private Vibrator vibrator;


private boolean isXperiaPlay; private boolean isXperiaPlay;

// This is to avoid losing the game/menu state etc when we are just
// switched-away from or rotated etc.
private boolean shuttingDown; private boolean shuttingDown;
private static int RESULT_LOAD_IMAGE = 1; private static int RESULT_LOAD_IMAGE = 1;


Expand Down Expand Up @@ -556,9 +559,9 @@ protected void onDestroy() {
mSurfaceView.onDestroy(); mSurfaceView.onDestroy();
mSurfaceView = null; mSurfaceView = null;
} }
NativeApp.audioShutdown();
if (shuttingDown || isFinishing()) { if (shuttingDown || isFinishing()) {
unregisterCallbacks(); unregisterCallbacks();
NativeApp.audioShutdown();
NativeApp.shutdown(); NativeApp.shutdown();
initialized = false; initialized = false;
} }
Expand Down

0 comments on commit 7a3a620

Please sign in to comment.