summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AsyncRequests.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2020-04-16 18:29:16 -0400
committerGitHub <noreply@github.com>2020-04-16 18:29:16 -0400
commit935b12d785b9bf0248b83f24ad47701ecbb958d9 (patch)
treec31f541db462c60112ad54c1dcfa0504239ce2b0 /Source/Core/VideoCommon/AsyncRequests.cpp
parent85a8325701b5f72dc6974725ff7b63078e2c01fe (diff)
parent812ad4257cf26f2de73aac30a46ac9d573940498 (diff)
Merge pull request #8730 from JosJuice/frame-advance-duplicate-frame
Core: Skip duplicate frames when using frame advance
Diffstat (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp')
-rw-r--r--Source/Core/VideoCommon/AsyncRequests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp
index a824d0020a..9a32b9ad48 100644
--- a/Source/Core/VideoCommon/AsyncRequests.cpp
+++ b/Source/Core/VideoCommon/AsyncRequests.cpp
@@ -97,6 +97,12 @@ void AsyncRequests::PushEvent(const AsyncRequests::Event& event, bool blocking)
}
}
+void AsyncRequests::WaitForEmptyQueue()
+{
+ std::unique_lock<std::mutex> lock(m_mutex);
+ m_cond.wait(lock, [this] { return m_queue.empty(); });
+}
+
void AsyncRequests::SetEnable(bool enable)
{
std::unique_lock<std::mutex> lock(m_mutex);