rsx: Improve gs frame exit workaround

Move to close(), hide before potential hanging at Emu.Stop()
This commit is contained in:
Eladash 2021-01-22 10:29:57 +02:00 committed by kd-11
parent 79513f06a4
commit b96864c7e6
2 changed files with 9 additions and 5 deletions

View File

@ -20,7 +20,6 @@ GSRender::~GSRender()
if (m_frame)
{
m_frame->hide();
m_frame->close();
}
}

View File

@ -286,12 +286,17 @@ bool gs_frame::get_mouse_lock_state()
void gs_frame::close()
{
if (!Emu.IsStopped())
Emu.CallAfter([this]()
{
Emu.Stop();
}
QWindow::hide(); // Workaround
Emu.CallAfter([this]() { deleteLater(); });
if (!Emu.IsStopped())
{
Emu.Stop();
}
deleteLater();
});
}
bool gs_frame::shown()