Преглед изворни кода

android: Return the correct status code on emulation stop

Charles Lombardo пре 2 година
родитељ
комит
7e2bd395bc
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/android/app/src/main/jni/native.cpp

+ 3 - 2
src/android/app/src/main/jni/native.cpp

@@ -327,12 +327,13 @@ public:
             m_system.ShutdownMainProcess();
             m_detached_tasks.WaitForAllTasks();
             m_load_result = Core::SystemResultStatus::ErrorNotInitialized;
+            m_window.reset();
+            OnEmulationStopped(Core::SystemResultStatus::Success);
+            return;
         }
 
         // Tear down the render window.
         m_window.reset();
-
-        OnEmulationStopped(m_load_result);
     }
 
     void PauseEmulation() {