From bda7db293d7e7f55cf98f22343a5dd0e310b7ce2 Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 24 Mar 2014 20:13:35 -0400 Subject: [PATCH 1/2] Win32/NVidia: switch to fullscreen after showing the window. Fixes a weird issue with vsync being ignored otherwise. --- Windows/WndMainWindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 9e0378d313..9b42806724 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -806,9 +806,6 @@ namespace MainWindow hideCursor = true; SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0); - if(g_Config.bFullScreen) - _ViewFullScreen(hwndMain); - ShowWindow(hwndMain, nCmdShow); W32Util::MakeTopMost(hwndMain, g_Config.bTopMost); @@ -818,6 +815,10 @@ namespace MainWindow WindowsRawInput::Init(); SetFocus(hwndMain); + + if (g_Config.bFullScreen) + _ViewFullScreen(hwndMain); + return TRUE; } From 1ca3d39a502e95aa2ecd93dbaf5241d7c0bba45b Mon Sep 17 00:00:00 2001 From: The Dax Date: Mon, 24 Mar 2014 20:15:41 -0400 Subject: [PATCH 2/2] Disable the adaptive vsync checks by commenting them out. No need to have a disabled check run every frame. --- GPU/GLES/GLES_GPU.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index 547b2e7a89..a49a49aa68 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -384,12 +384,14 @@ GLES_GPU::GLES_GPU() : resized_(false) { #ifdef _WIN32 lastVsync_ = g_Config.bVSync ? 1 : 0; - if (gl_extensions.EXT_swap_control_tear) { + // Disabled EXT_swap_control_tear for now, it never seems to settle at the correct timing + // so it just keeps tearing. Not what I hoped for... + //if (false && gl_extensions.EXT_swap_control_tear) { // See http://developer.download.nvidia.com/opengl/specs/WGL_EXT_swap_control_tear.txt - glstate.SetVSyncInterval(g_Config.bVSync ? -1 :0); - } else { + // glstate.SetVSyncInterval(g_Config.bVSync ? -1 :0); + //} else { glstate.SetVSyncInterval(g_Config.bVSync ? 1 : 0); - } + //} #endif shaderManager_ = new ShaderManager(); @@ -517,12 +519,12 @@ void GLES_GPU::BeginFrameInternal() { if (desiredVSyncInterval != lastVsync_) { // Disabled EXT_swap_control_tear for now, it never seems to settle at the correct timing // so it just keeps tearing. Not what I hoped for... - if (false && gl_extensions.EXT_swap_control_tear) { + //if (false && gl_extensions.EXT_swap_control_tear) { // See http://developer.download.nvidia.com/opengl/specs/WGL_EXT_swap_control_tear.txt - glstate.SetVSyncInterval(-desiredVSyncInterval); - } else { + // glstate.SetVSyncInterval(-desiredVSyncInterval); + //} else { glstate.SetVSyncInterval(desiredVSyncInterval); - } + //} lastVsync_ = desiredVSyncInterval; } #endif