HostInterface: Reset throttle timer on slowdown

Prevents too slow messages when fast forwarding.
This commit is contained in:
Connor McLaughlin 2019-11-17 01:47:50 +10:00
parent b5c799ba81
commit b2b5e6c793

View file

@ -141,7 +141,8 @@ void HostInterface::Throttle()
m_speed_lost_time_timestamp.Reset();
}
#endif
m_last_throttle_time = time - MAX_VARIANCE_TIME;
m_last_throttle_time = 0;
m_throttle_timer.Reset();
}
else if (sleep_time >= MINIMUM_SLEEP_TIME && sleep_time <= m_throttle_period)
{
@ -213,4 +214,6 @@ void HostInterface::UpdateSpeedLimiterState()
m_audio_stream->SetSync(audio_sync_enabled);
m_display->SetVSync(video_sync_enabled);
m_throttle_timer.Reset();
m_last_throttle_time = 0;
}