diff options
| author | Jules Blok <jules.blok@gmail.com> | 2016-11-11 20:30:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-11 20:30:31 +0100 |
| commit | f0ce3275afacbb8b61656f6d64216efee1dc2958 (patch) | |
| tree | 2b22d1c4ac8caefafea4abb4abc1d8c2ef96d41b /Source/Core/VideoCommon/Fifo.cpp | |
| parent | fbfce2a043394ecbd6da7affd6184a640e858d29 (diff) | |
| parent | 20d49ba97f14649c459f5311bf6325daebfa382a (diff) | |
Merge pull request #4439 from Armada651/yield-ui
CPU: Fix deadlocks by periodically yielding to the UI message pump.
Diffstat (limited to 'Source/Core/VideoCommon/Fifo.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Fifo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index 374ddb07f3..678dc77687 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -18,6 +18,7 @@ #include "Core/CoreTiming.h" #include "Core/HW/Memmap.h" #include "Core/HW/SystemTimers.h" +#include "Core/Host.h" #include "Core/NetPlayProto.h" #include "VideoCommon/AsyncRequests.h" @@ -94,7 +95,13 @@ void PauseAndLock(bool doLock, bool unpauseOnUnlock) { SyncGPU(SyncGPUReason::Other); EmulatorState(false); - FlushGpu(); + + const SConfig& param = SConfig::GetInstance(); + + if (!param.bCPUThread || s_use_deterministic_gpu_thread) + return; + + s_gpu_mainloop.WaitYield(std::chrono::milliseconds(100), Host_YieldToUI); } else { |
