diff options
| author | Stenzek <stenzek@gmail.com> | 2019-01-27 12:24:53 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2019-01-27 12:31:12 +1000 |
| commit | b01df8670fd9cf0571230ca7f0e19611e71256dd (patch) | |
| tree | e03de4b65072945c98fe3a0ec25b617c01ac1ee3 /Source/Core/VideoCommon/VideoConfig.cpp | |
| parent | ff5e29657655b0a423b94575f5766e6a56fc3407 (diff) | |
Renderer: Fix throttle-disable (TAB) hotkey when vsync is enabled
Diffstat (limited to 'Source/Core/VideoCommon/VideoConfig.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index cc14b191fd..6520cbe7bc 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -19,11 +19,19 @@ VideoConfig g_Config; VideoConfig g_ActiveConfig; static bool s_has_registered_callback = false; +static bool IsVSyncActive(bool enabled) +{ + // Vsync is disabled when the throttler is disabled by the tab key. + return enabled && !Core::GetIsThrottlerTempDisabled() && + SConfig::GetInstance().m_EmulationSpeed == 1.0; +} + void UpdateActiveConfig() { if (Movie::IsPlayingInput() && Movie::IsConfigSaved()) Movie::SetGraphicsConfig(); g_ActiveConfig = g_Config; + g_ActiveConfig.bVSyncActive = IsVSyncActive(g_ActiveConfig.bVSync); } VideoConfig::VideoConfig() @@ -175,12 +183,6 @@ void VideoConfig::VerifyValidity() } } -bool VideoConfig::IsVSync() const -{ - return bVSync && !Core::GetIsThrottlerTempDisabled() && - SConfig::GetInstance().m_EmulationSpeed == 1.0; -} - bool VideoConfig::UsingUberShaders() const { return iShaderCompilationMode == ShaderCompilationMode::SynchronousUberShaders || |
