summaryrefslogtreecommitdiff
path: root/src/citra_qt/bootmanager.cpp
diff options
context:
space:
mode:
authorGravatar James Rowe2015-05-16 11:56:00 -0600
committerGravatar James Rowe2015-05-18 08:15:57 -0600
commita406207cd81c9fc3218f29394e11e7711817c458 (patch)
tree87bf96769c74b48468144e9ab238688ee9370434 /src/citra_qt/bootmanager.cpp
parentMerge pull request #781 from archshift/delete (diff)
downloadyuzu-a406207cd81c9fc3218f29394e11e7711817c458.tar.gz
yuzu-a406207cd81c9fc3218f29394e11e7711817c458.tar.xz
yuzu-a406207cd81c9fc3218f29394e11e7711817c458.zip
Use condition var to properly pause the CPU thread
Adds support for threaded pausing so citra doesn't spin wait on pause
Diffstat (limited to 'src/citra_qt/bootmanager.cpp')
-rw-r--r--src/citra_qt/bootmanager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index d3df289f8..ab9403007 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -59,6 +59,9 @@ void EmuThread::run() {
59 yieldCurrentThread(); 59 yieldCurrentThread();
60 60
61 was_active = false; 61 was_active = false;
62 } else {
63 std::unique_lock<std::mutex> lock(running_mutex);
64 running_cv.wait(lock, [this]{ return IsRunning() || stop_run; });
62 } 65 }
63 } 66 }
64 67