From 4cab718065a126b204f38f1238fa1aae4c0591e3 Mon Sep 17 00:00:00 2001 From: Mike Harris Date: Thu, 5 Oct 2017 00:21:37 -0700 Subject: Move emulation lifecycle handling into EmulationFragment. The Activity is responsible for just its views and menus and such. It signals the Fragment via setGamePath, StartEmulation and StopEmulation. The Fragment manages the actual emulation lifecycle. It is solely responsible for calling the NativeLibrary lifecycle methods. With this lifecycle simplification, the NativeLibrary no longer needs to kill the Activity. It happens normally now. This simplifies a lot of things, live handling rotation. --- Source/Android/jni/MainAndroid.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Source/Android/jni/MainAndroid.cpp') diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 35c81cc305..3e128997b4 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -58,7 +58,6 @@ std::string s_set_userpath; jclass s_jni_class; jmethodID s_jni_method_alert; -jmethodID s_jni_method_end; // The Core only supports using a single Host thread. // If multiple threads want to call host functions then they need to queue @@ -732,7 +731,6 @@ Java_org_dolphinemu_dolphinemu_NativeLibrary_CacheClassesAndMethods(JNIEnv* env, // Source/Android/app/build/intermediates/classes/arm/debug/org/dolphinemu/dolphinemu/NativeLibrary.class s_jni_method_alert = env->GetStaticMethodID(s_jni_class, "displayAlertMsg", "(Ljava/lang/String;)V"); - s_jni_method_end = env->GetStaticMethodID(s_jni_class, "endEmulationActivity", "()V"); } // Surface Handling @@ -816,9 +814,6 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv* ANativeWindow_release(s_surf); s_surf = nullptr; } - - // Execute the Java method. - env->CallStaticVoidMethod(s_jni_class, s_jni_method_end); } #ifdef __cplusplus -- cgit v1.2.3