mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix lockup when cancelling shutdown and fullscreen
This commit is contained in:
parent
daef69099b
commit
4404b06d2a
|
@ -3000,8 +3000,16 @@ MainWindow::VMLock::~VMLock()
|
||||||
{
|
{
|
||||||
if (m_was_fullscreen)
|
if (m_was_fullscreen)
|
||||||
g_emu_thread->setSurfaceless(false);
|
g_emu_thread->setSurfaceless(false);
|
||||||
|
|
||||||
if (!m_was_paused)
|
if (!m_was_paused)
|
||||||
g_emu_thread->setVMPaused(false);
|
g_emu_thread->setVMPaused(false);
|
||||||
|
|
||||||
|
if (m_was_fullscreen)
|
||||||
|
{
|
||||||
|
// Wait until we get the display widget back, so we're not the last window left and closing.
|
||||||
|
while (QtHost::IsVMValid() && !g_main_window->m_display_widget)
|
||||||
|
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::VMLock::cancelResume()
|
void MainWindow::VMLock::cancelResume()
|
||||||
|
|
Loading…
Reference in New Issue