mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
DolphinQt: Fix the panic alert deadlock, GPU thread edition
The fix in ef77872
worked for panic alerts from
the CPU thread, but there were still problems with
panic alerts from the GPU thread in dual core mode.
This change attempts to fix those.
This commit is contained in:
@ -421,10 +421,10 @@ bool RenderWidget::event(QEvent* event)
|
||||
|
||||
if (Config::Get(Config::MAIN_PAUSE_ON_FOCUS_LOST) && Core::GetState() == Core::State::Running)
|
||||
{
|
||||
// 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())
|
||||
// If we are declared as the CPU or GPU thread, it means that the real CPU or GPU 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 core would cause a deadlock
|
||||
if (!Core::IsCPUThread() && !Core::IsGPUThread())
|
||||
Core::SetState(Core::State::Paused);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user