summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSilent <zdanio95@gmail.com>2019-08-18 14:51:18 +0200
committerSilent <zdanio95@gmail.com>2019-08-18 17:39:26 +0200
commit2bc9e09456ed544efba044a4734a8ef2d960aa08 (patch)
treed031f47da5f573b7cf540951d77c018a988edf3f /Source
parent7520306671d90000f62295e300a66b2e305d665a (diff)
Core/CPU: Do not yield to UI from CPU methods
Core::RunAsCPUThread may be called from Qt signals, and if code yields to UI there then it results in infinite recursion
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/CPU.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp
index b8243a0452..28fabff2fb 100644
--- a/Source/Core/Core/HW/CPU.cpp
+++ b/Source/Core/Core/HW/CPU.cpp
@@ -183,10 +183,7 @@ void Stop()
while (s_state_cpu_thread_active)
{
- std::cv_status status =
- s_state_cpu_idle_cvar.wait_for(state_lock, std::chrono::milliseconds(100));
- if (status == std::cv_status::timeout)
- Host_YieldToUI();
+ s_state_cpu_idle_cvar.wait(state_lock);
}
RunAdjacentSystems(false);
@@ -252,10 +249,7 @@ void EnableStepping(bool stepping)
while (s_state_cpu_thread_active)
{
- std::cv_status status =
- s_state_cpu_idle_cvar.wait_for(state_lock, std::chrono::milliseconds(100));
- if (status == std::cv_status::timeout)
- Host_YieldToUI();
+ s_state_cpu_idle_cvar.wait(state_lock);
}
RunAdjacentSystems(false);
@@ -303,10 +297,7 @@ bool PauseAndLock(bool do_lock, bool unpause_on_unlock, bool control_adjacent)
while (s_state_cpu_thread_active)
{
- std::cv_status status =
- s_state_cpu_idle_cvar.wait_for(state_lock, std::chrono::milliseconds(100));
- if (status == std::cv_status::timeout)
- Host_YieldToUI();
+ s_state_cpu_idle_cvar.wait(state_lock);
}
if (control_adjacent)