rsx: Improve gs frame exit workaround

Move to close(), hide before potential hanging at Emu.Stop()
This commit is contained in:
Eladash authored and kd-11 committed 2021-01-23 12:45:53 +03:00
1 parent 79513f06a4
commit b96864c7e6
2 files changed
+9 -5

No files matched your search

-1
View File
@@ -20,7 +20,6 @@ GSRender::~GSRender()
if (m_frame)
{
m_frame->hide();
m_frame->close();
}
}
+9 -4
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()