diff options
| author | JosJuice <josjuice@gmail.com> | 2020-04-07 19:37:32 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-04-09 11:39:29 +0200 |
| commit | 812ad4257cf26f2de73aac30a46ac9d573940498 (patch) | |
| tree | c9017c1ad7cfbb68697b8f29161bcce60f29e0cb /Source/Core/VideoCommon/AsyncRequests.cpp | |
| parent | 1a42355f96fdc1e63fc183557e6fd574c4e31a75 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AsyncRequests.cpp | 6 |
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); |
