summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2019-01-31 22:44:10 +0100
committerGitHub <noreply@github.com>2019-01-31 22:44:10 +0100
commitc1492aeb45e471cd37cd562f3fc87c27ab0fcd4c (patch)
tree5f46fc0539042a0b59323de07c7e944e1cf4f006 /Source/Core/VideoBackends
parent9c38772301101c4cd0f2a7912c9314ce6492cb62 (diff)
parentb01df8670fd9cf0571230ca7f0e19611e71256dd (diff)
Merge pull request #7744 from stenzek/vsync
Renderer: Fix throttle-disable (TAB) hotkey when vsync is enabled
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D/D3DBase.cpp4
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp4
-rw-r--r--Source/Core/VideoBackends/Vulkan/Renderer.cpp2
-rw-r--r--Source/Core/VideoBackends/Vulkan/main.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DBase.cpp b/Source/Core/VideoBackends/D3D/D3DBase.cpp
index 333fd969f5..654cf17c95 100644
--- a/Source/Core/VideoBackends/D3D/D3DBase.cpp
+++ b/Source/Core/VideoBackends/D3D/D3DBase.cpp
@@ -601,7 +601,7 @@ void Present()
// flag when it is supported, even when presenting in windowed mode.
// However, this flag cannot be used if the app is in fullscreen mode as a
// result of calling SetFullscreenState.
- if (AllowTearingSupported() && !g_ActiveConfig.IsVSync() && !GetFullscreenState())
+ if (AllowTearingSupported() && !g_ActiveConfig.bVSyncActive && !GetFullscreenState())
present_flags |= DXGI_PRESENT_ALLOW_TEARING;
if (swapchain->IsTemporaryMonoSupported() && g_ActiveConfig.stereo_mode != StereoMode::QuadBuffer)
@@ -610,7 +610,7 @@ void Present()
}
// TODO: Is 1 the correct value for vsyncing?
- swapchain->Present(static_cast<UINT>(g_ActiveConfig.IsVSync()), present_flags);
+ swapchain->Present(static_cast<UINT>(g_ActiveConfig.bVSyncActive), present_flags);
}
HRESULT SetFullscreenState(bool enable_fullscreen)
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 35ec1a6715..68e888f6bf 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -751,7 +751,7 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
// Handle VSync on/off
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_VSYNC))
- m_main_gl_context->SwapInterval(g_ActiveConfig.IsVSync());
+ m_main_gl_context->SwapInterval(g_ActiveConfig.bVSyncActive);
// Because of the fixed framebuffer size we need to disable the resolution
// options while running
@@ -1439,7 +1439,7 @@ void Renderer::OnConfigChanged(u32 bits)
}
if (bits & CONFIG_CHANGE_BIT_VSYNC && !DriverDetails::HasBug(DriverDetails::BUG_BROKEN_VSYNC))
- m_main_gl_context->SwapInterval(g_ActiveConfig.IsVSync());
+ m_main_gl_context->SwapInterval(g_ActiveConfig.bVSyncActive);
if (bits & CONFIG_CHANGE_BIT_ANISOTROPY)
g_sampler_cache->Clear();
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
index dffe3fdd3c..9d1dc7ae88 100644
--- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp
+++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp
@@ -735,7 +735,7 @@ void Renderer::OnConfigChanged(u32 bits)
if (m_swap_chain && bits & CONFIG_CHANGE_BIT_VSYNC)
{
g_command_buffer_mgr->WaitForGPUIdle();
- m_swap_chain->SetVSync(g_ActiveConfig.IsVSync());
+ m_swap_chain->SetVSync(g_ActiveConfig.bVSyncActive);
}
// For quad-buffered stereo we need to change the layer count, so recreate the swap chain.
diff --git a/Source/Core/VideoBackends/Vulkan/main.cpp b/Source/Core/VideoBackends/Vulkan/main.cpp
index 53c04c4e37..b5eeb51da6 100644
--- a/Source/Core/VideoBackends/Vulkan/main.cpp
+++ b/Source/Core/VideoBackends/Vulkan/main.cpp
@@ -213,8 +213,8 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
std::unique_ptr<SwapChain> swap_chain;
if (surface != VK_NULL_HANDLE)
{
- swap_chain =
- SwapChain::Create(wsi.display_connection, wsi.render_surface, surface, g_Config.IsVSync());
+ swap_chain = SwapChain::Create(wsi.display_connection, wsi.render_surface, surface,
+ g_ActiveConfig.bVSyncActive);
if (!swap_chain)
{
PanicAlert("Failed to create Vulkan swap chain.");