diff options
author | Liam <byteslice@airmail.cc> | 2022-11-15 03:00:32 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-11-15 03:18:52 +0100 |
commit | cf202f371862ebe92dd88924a9f7b8cfbc7ad738 (patch) | |
tree | d77708003ece5424446ac2824415c98dc1cf0c86 /src/core/hle/service/nvflinger/buffer_queue_core.cpp | |
parent | Merge pull request #9225 from liamwhite/debugger-instance (diff) | |
download | yuzu-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.cpp | 6 |
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; } |