From 812ad4257cf26f2de73aac30a46ac9d573940498 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 7 Apr 2020 19:37:32 +0200 Subject: Core: Skip duplicate frames when using frame advance It used to be the case that frame advance skipped duplicate frames (i.e. it would take 30 frame advances to get through one second of emulated time in a 30 fps game), but this broke in 9c5c3c0. Skipping duplicate frames making TASing less annoying. --- Source/Core/VideoCommon/AsyncRequests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp') 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 lock(m_mutex); + m_cond.wait(lock, [this] { return m_queue.empty(); }); +} + void AsyncRequests::SetEnable(bool enable) { std::unique_lock lock(m_mutex); -- cgit v1.2.3