VideoCommon: Add support for icons in OSD messages.

This commit is contained in:
Admiral H. Curtiss
2023-10-17 01:42:22 +02:00
parent 7122c7e872
commit cb13ad7a5f
3 changed files with 73 additions and 13 deletions

View File

@ -579,9 +579,6 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
HW::Shutdown(system);
INFO_LOG_FMT(CONSOLE, "{}", StopMessage(false, "HW shutdown"));
// 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();
@ -600,7 +597,12 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
PanicAlertFmt("Failed to initialize video backend!");
return;
}
Common::ScopeGuard video_guard{[] { g_video_backend->Shutdown(); }};
Common::ScopeGuard video_guard{[] {
// Clear on screen messages that haven't expired
OSD::ClearMessages();
g_video_backend->Shutdown();
}};
if (cpu_info.HTT)
Config::SetBaseOrCurrent(Config::MAIN_DSP_THREAD, cpu_info.num_cores > 4);