diff options
| author | JosJuice <josjuice@gmail.com> | 2020-05-18 19:38:56 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-05-18 19:38:56 +0200 |
| commit | cc330afa6bc7da0bce00e2d4de68ff13315f1e96 (patch) | |
| tree | 762db4b81c3f2e53fb4f8830947717330b28f725 /Source/Core | |
| parent | abe125aea7ff4f01b50b54c976e478ad5dfbdd5f (diff) | |
DolphinQt: Fix the panic alert deadlock, Pause on Focus Loss edition
why are there so many ways to trigger this issue
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/RenderWidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/RenderWidget.cpp b/Source/Core/DolphinQt/RenderWidget.cpp index 234eb270cb..e784956e27 100644 --- a/Source/Core/DolphinQt/RenderWidget.cpp +++ b/Source/Core/DolphinQt/RenderWidget.cpp @@ -203,7 +203,13 @@ bool RenderWidget::event(QEvent* event) break; case QEvent::WindowDeactivate: if (SConfig::GetInstance().m_PauseOnFocusLost && Core::GetState() == Core::State::Running) - Core::SetState(Core::State::Paused); + { + // If we are declared as the CPU thread, it means that the real CPU thread is waiting + // for us to finish showing a panic alert (with that panic alert likely being the cause + // of this event), so trying to pause the real CPU thread would cause a deadlock + if (!Core::IsCPUThread()) + Core::SetState(Core::State::Paused); + } emit FocusChanged(false); break; |
