android: native: Change order of EmuWindow teardown.

- This needs to happen after system shutdown for asynchronous GPU.
This commit is contained in:
bunnei 2019-10-03 21:59:30 -04:00 committed by xperia64
parent bd6d13f279
commit cab213436b

View File

@ -123,6 +123,9 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
return Core::System::ResultStatus::ErrorLoader;
}
window = std::make_unique<EmuWindow_Android>(s_surf);
SCOPE_EXIT({ window.reset(); });
Core::System& system{Core::System::GetInstance()};
SCOPE_EXIT({ system.Shutdown(); });
@ -139,9 +142,6 @@ static Core::System::ResultStatus RunCitra(const std::string& filepath) {
InputManager::Init();
SCOPE_EXIT({ InputManager::Shutdown(); });
window = std::make_unique<EmuWindow_Android>(s_surf);
SCOPE_EXIT({ window.reset(); });
const Core::System::ResultStatus load_result{system.Load(*window, filepath)};
if (load_result != Core::System::ResultStatus::Success) {
return load_result;