From a406207cd81c9fc3218f29394e11e7711817c458 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sat, 16 May 2015 11:56:00 -0600 Subject: Use condition var to properly pause the CPU thread Adds support for threaded pausing so citra doesn't spin wait on pause --- src/citra_qt/bootmanager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/citra_qt/bootmanager.cpp') 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() { yieldCurrentThread(); was_active = false; + } else { + std::unique_lock lock(running_mutex); + running_cv.wait(lock, [this]{ return IsRunning() || stop_run; }); } } -- cgit v1.2.3