Use condition var to properly pause the CPU thread

Adds support for threaded pausing so citra doesn't spin wait on pause
This commit is contained in:
James Rowe 2015-05-16 11:56:00 -06:00
parent 9fb9750411
commit a406207cd8
2 changed files with 14 additions and 2 deletions

View file

@ -59,6 +59,9 @@ void EmuThread::run() {
yieldCurrentThread();
was_active = false;
} else {
std::unique_lock<std::mutex> lock(running_mutex);
running_cv.wait(lock, [this]{ return IsRunning() || stop_run; });
}
}