From b462946e7c96c700a6e5161059191f086b82db1c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 7 Jan 2021 23:14:54 -0800 Subject: [PATCH 1/2] Core: Properly stop on abrupt shutdown. When dragging a game/dump/etc. into PPSSPP while running, we call shutdown immediately. This wasn't properly notifying Stop handlers. Fixes #13884. --- Core/System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/System.cpp b/Core/System.cpp index 2be0a5f9f0..16ae2808de 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -493,7 +493,7 @@ void PSP_Shutdown() { // Make sure things know right away that PSP memory, etc. is going away. pspIsQuitting = true; if (coreState == CORE_RUNNING) - Core_UpdateState(CORE_POWERDOWN); + Core_Stop(); #ifndef MOBILE_DEVICE if (g_Config.bFuncHashMap) { From 97b951892997b69d6cf8bec0934fea9f86c5f732 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 7 Jan 2021 23:16:17 -0800 Subject: [PATCH 2/2] UI: Prevent self-powerdown check on load new game. Sometimes, when loading a new game or dump while an existing one is running, we'd detect the "powerdown" and force back to the menu. This was a race condition. --- UI/EmuScreen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index a84de656d7..bb5a62492e 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -420,6 +420,8 @@ void EmuScreen::sendMessage(const char *message, const char *value) { PSP_Shutdown(); bootPending_ = true; gamePath_ = value; + // Don't leave it on CORE_POWERDOWN, we'll sometimes aggressively bail. + Core_UpdateState(CORE_POWERUP); } } else if (!strcmp(message, "config_loaded")) { // In case we need to position touch controls differently.