Improve quit logging

This commit is contained in:
Megamouse 2026-04-18 17:37:13 +02:00
parent aff082e0c1
commit 7a4d7aa936
4 changed files with 8 additions and 3 deletions

View File

@ -4018,7 +4018,9 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
if (allow_autoexit)
{
Quit(g_cfg.misc.autoexit.get());
const bool autoexit = g_cfg.misc.autoexit.get();
sys_log.notice("Quit with main_window::closeEvent. (autoexit=%d)", autoexit);
Quit(autoexit);
}
if (after_kill_callback)

View File

@ -58,7 +58,7 @@ void headless_application::InitializeCallbacks()
on_exit();
}
sys_log.notice("Quitting headless application");
sys_log.notice("Quitting headless application (force_quit=%d)", force_quit);
quit();
return true;
}

View File

@ -640,13 +640,15 @@ void gui_application::InitializeCallbacks()
on_exit();
}
const bool no_gui = !m_main_window;
if (m_main_window)
{
// Close main window in order to save its window state
m_main_window->close();
}
gui_log.notice("Quitting gui application");
gui_log.notice("Quitting gui application (force_quit=%d, no-gui=%d)", force_quit, no_gui);
quit();
return true;
}

View File

@ -3944,6 +3944,7 @@ void main_window::closeEvent(QCloseEvent* closeEvent)
Q_EMIT NotifyWindowCloseEvent(true);
gui_log.notice("Quit with main_window::closeEvent");
Emu.Quit(true);
}