Qt: notify progress dialog cancelation when closing the game window

This commit is contained in:
Megamouse 2023-11-25 11:46:55 +01:00
parent ac869ec855
commit 57324f1703
1 changed files with 6 additions and 0 deletions

View File

@ -614,6 +614,9 @@ void gs_frame::close()
if (!Emu.IsStopped())
{
// Notify progress dialog cancellation
g_system_progress_canceled = true;
// Blocking shutdown request. Obsolete, but I'm keeping it here as last resort.
Emu.after_kill_callback = [this](){ deleteLater(); };
Emu.GracefulShutdown(true);
@ -1112,6 +1115,9 @@ bool gs_frame::event(QEvent* ev)
}
else
{
// Notify progress dialog cancellation
g_system_progress_canceled = true;
// Issue async shutdown
Emu.GracefulShutdown(true, true);