mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
System: Fix vsync resetting on pause and fast forward on boot
This commit is contained in:
parent
fd3de15589
commit
8f314c8d49
|
@ -931,6 +931,7 @@ void System::PauseSystem(bool paused)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::OnSystemResumed();
|
Host::OnSystemResumed();
|
||||||
|
g_host_display->SetVSync(ShouldUseVSync());
|
||||||
ResetPerformanceCounters();
|
ResetPerformanceCounters();
|
||||||
ResetThrottler();
|
ResetThrottler();
|
||||||
}
|
}
|
||||||
|
@ -1252,6 +1253,8 @@ bool System::Initialize(bool force_software_renderer)
|
||||||
s_throttle_frequency = 60.0f;
|
s_throttle_frequency = 60.0f;
|
||||||
s_frame_period = 0;
|
s_frame_period = 0;
|
||||||
s_next_frame_time = 0;
|
s_next_frame_time = 0;
|
||||||
|
m_turbo_enabled = false;
|
||||||
|
m_fast_forward_enabled = false;
|
||||||
|
|
||||||
s_average_frame_time_accumulator = 0.0f;
|
s_average_frame_time_accumulator = 0.0f;
|
||||||
s_worst_frame_time_accumulator = 0.0f;
|
s_worst_frame_time_accumulator = 0.0f;
|
||||||
|
|
|
@ -475,10 +475,7 @@ void FullscreenUI::OnSystemPaused()
|
||||||
|
|
||||||
void FullscreenUI::OnSystemResumed()
|
void FullscreenUI::OnSystemResumed()
|
||||||
{
|
{
|
||||||
if (!IsInitialized())
|
// noop
|
||||||
return;
|
|
||||||
|
|
||||||
g_host_display->SetVSync(System::ShouldUseVSync());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullscreenUI::OnSystemDestroyed()
|
void FullscreenUI::OnSystemDestroyed()
|
||||||
|
|
Loading…
Reference in a new issue