From 8181a7b3dd932a3035b9fc56f6def70c0cc05c59 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 6 Nov 2020 23:05:23 +0100 Subject: [PATCH] Android: Remove unnecessary ANativeWindow_release call This is already handled by SurfaceDestroyed. In the worst case, the extra code could even race with SurfaceDestroyed if they are triggered at the same time, but this is highly improbable. --- Source/Android/jni/MainAndroid.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 9e2950b630..6fe6da3b61 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -543,12 +543,6 @@ static void Run(JNIEnv* env, const std::vector& paths, ButtonManager::Shutdown(); host_identity_guard.unlock(); - if (s_surf) - { - ANativeWindow_release(s_surf); - s_surf = nullptr; - } - env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(), IDCache::GetFinishEmulationActivity()); }