From 2b77320460e2620a856efd6b020b29155efb4863 Mon Sep 17 00:00:00 2001 From: Ender's Games Date: Wed, 8 Aug 2018 11:54:21 -0400 Subject: [PATCH] Android: restore hard exiting thread (w/ notes) This is not yet avoidable, but can at least be explained. --- .../src/main/java/com/reicast/emulator/GL2JNINative.java | 5 ----- .../src/main/java/com/reicast/emulator/emu/GL2JNIView.java | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java index 495bb9ce6..923b96ac7 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/GL2JNINative.java @@ -586,11 +586,6 @@ public class GL2JNINative extends NativeActivity { moga.onDestroy(); } - @Override - protected void onStop() { - super.onStop(); - } - @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GL2JNIView.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GL2JNIView.java index 2853ac11f..872f65062 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GL2JNIView.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/emu/GL2JNIView.java @@ -681,6 +681,8 @@ public class GL2JNIView extends GLSurfaceView } public void onDestroy() { + // Workaround for ANR when returning to menu + System.exit(0); try { ethd.join(); } catch (InterruptedException e) {