mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 21:58:48 +00:00
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.
This commit is contained in:
parent
1a42355f96
commit
812ad4257c
4 changed files with 54 additions and 28 deletions
|
@ -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);
|
||||
|
|
|
@ -82,6 +82,7 @@ public:
|
|||
PullEventsInternal();
|
||||
}
|
||||
void PushEvent(const Event& event, bool blocking = false);
|
||||
void WaitForEmptyQueue();
|
||||
void SetEnable(bool enable);
|
||||
void SetPassthrough(bool enable);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue