diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 760d16d95d..128a2a228d 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -481,6 +481,16 @@ static void EmuThread(std::unique_ptr boot) INFO_LOG(CONSOLE, "%s", StopMessage(false, "Shutting down HW").c_str()); HW::Shutdown(); INFO_LOG(CONSOLE, "%s", StopMessage(false, "HW shutdown").c_str()); + + // Clear on screen messages that haven't expired + OSD::ClearMessages(); + + // The config must be restored only after the whole HW has shut down, + // not when it is still running. + BootManager::RestoreConfig(); + + PatchEngine::Shutdown(); + HLE::Clear(); }}; if (!g_video_backend->Initialize(s_window_handle)) @@ -638,13 +648,6 @@ static void EmuThread(std::unique_ptr boot) if (core_parameter.bCPUThread) g_video_backend->Video_Cleanup(); - // Clear on screen messages that haven't expired - OSD::ClearMessages(); - - BootManager::RestoreConfig(); - - PatchEngine::Shutdown(); - HLE::Clear(); // If we shut down normally, the stop message does not need to be triggered. stop_message_guard.Dismiss(); }