mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 07:15:46 -04:00
FullscreenUI: Fix incorrect vsync state on unpause
This commit is contained in:
@ -2192,11 +2192,10 @@ void System::UpdateSpeedLimiterState()
|
||||
}
|
||||
}
|
||||
|
||||
const bool is_non_standard_speed = (std::abs(target_speed - 1.0f) > 0.05f);
|
||||
const bool is_non_standard_speed = IsRunningAtNonStandardSpeed();
|
||||
const bool audio_sync_enabled =
|
||||
!IsRunning() || (m_throttler_enabled && g_settings.audio_sync_enabled && !is_non_standard_speed);
|
||||
const bool video_sync_enabled =
|
||||
!IsRunning() || (m_throttler_enabled && g_settings.video_sync_enabled && !is_non_standard_speed);
|
||||
const bool video_sync_enabled = ShouldUseVSync();
|
||||
const float max_display_fps = (!IsRunning() || m_throttler_enabled) ? 0.0f : g_settings.display_max_fps;
|
||||
Log_InfoPrintf("Target speed: %f%%", target_speed * 100.0f);
|
||||
Log_InfoPrintf("Syncing to %s%s", audio_sync_enabled ? "audio" : "",
|
||||
@ -2241,6 +2240,11 @@ void System::UpdateSpeedLimiterState()
|
||||
}
|
||||
}
|
||||
|
||||
bool System::ShouldUseVSync()
|
||||
{
|
||||
return (!IsRunning() || (m_throttler_enabled && g_settings.video_sync_enabled && !IsRunningAtNonStandardSpeed()));
|
||||
}
|
||||
|
||||
bool System::IsFastForwardEnabled()
|
||||
{
|
||||
return m_fast_forward_enabled;
|
||||
|
@ -400,6 +400,9 @@ void ToggleWidescreen();
|
||||
/// Returns true if fast forwarding or slow motion is currently active.
|
||||
bool IsRunningAtNonStandardSpeed();
|
||||
|
||||
/// Returns true if vsync should be used.
|
||||
bool ShouldUseVSync();
|
||||
|
||||
/// Quick switch between software and hardware rendering.
|
||||
void ToggleSoftwareRendering();
|
||||
|
||||
|
Reference in New Issue
Block a user