Fix delay before throttling emulation after fast-forward ends
Previously `m_throttle_deadline` was not being updated during fast-forward, causing the emulator to try to render as many frames as possible in zero seconds. And when you released fast-forward, the emulator would continue to fast-forward for an emulated time equal to the physical time you held the key, waiting for `m_throttle_deadline` to catch up to the physical time. This was only limited when the "System can not to keep up with timings!" fallback would keep the target timebase 100ms before the current time, so the emulator would never fast-forward more than 100ms emulated time after you released Tab. Instead update `m_throttle_deadline` to track wall-clock time, so emulation resumes throttling as usual once fast-forward ends.
This commit is contained in:
parent
0a2afa48b7
commit
9b72524511
|
@ -373,6 +373,11 @@ void CoreTimingManager::Throttle(const s64 target_cycle)
|
|||
const TimePoint min_deadline = time - m_max_fallback;
|
||||
const TimePoint max_deadline = time + m_max_fallback;
|
||||
|
||||
if (speed <= 0.0)
|
||||
{
|
||||
m_throttle_deadline = time;
|
||||
}
|
||||
|
||||
if (m_throttle_deadline > max_deadline)
|
||||
{
|
||||
m_throttle_deadline = max_deadline;
|
||||
|
|
Loading…
Reference in New Issue