summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger/buffer_queue_core.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-11-15 03:00:32 +0100
committerLiam <byteslice@airmail.cc>2022-11-15 03:18:52 +0100
commitcf202f371862ebe92dd88924a9f7b8cfbc7ad738 (patch)
treed77708003ece5424446ac2824415c98dc1cf0c86 /src/core/hle/service/nvflinger/buffer_queue_core.cpp
parentMerge pull request #9225 from liamwhite/debugger-instance (diff)
downloadyuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.tar
yuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.tar.gz
yuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.tar.bz2
yuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.tar.lz
yuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.tar.xz
yuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.tar.zst
yuzu-cf202f371862ebe92dd88924a9f7b8cfbc7ad738.zip
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue_core.cpp')
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue_core.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue_core.cpp b/src/core/hle/service/nvflinger/buffer_queue_core.cpp
index ea4a14ea4..3d1338e66 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_core.cpp
+++ b/src/core/hle/service/nvflinger/buffer_queue_core.cpp
@@ -23,15 +23,17 @@ void BufferQueueCore::NotifyShutdown() {
}
void BufferQueueCore::SignalDequeueCondition() {
+ dequeue_possible.store(true);
dequeue_condition.notify_all();
}
-bool BufferQueueCore::WaitForDequeueCondition() {
+bool BufferQueueCore::WaitForDequeueCondition(std::unique_lock<std::mutex>& lk) {
if (is_shutting_down) {
return false;
}
- dequeue_condition.wait(mutex);
+ dequeue_condition.wait(lk, [&] { return dequeue_possible.load(); });
+ dequeue_possible.store(false);
return true;
}