From 2c74693f6c3ada390da3cfb957c5830ce9d1bfb2 Mon Sep 17 00:00:00 2001 From: Sacha Date: Sun, 27 Oct 2013 23:09:46 +1000 Subject: [PATCH] VSync codepath only works on _WIN32 so only show it and check it there. --- GPU/GLES/GLES_GPU.cpp | 4 ++++ GPU/GPUCommon.cpp | 5 +---- UI/GameSettingsScreen.cpp | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index e5b53d18d1..939edab745 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -377,6 +377,7 @@ static const CommandTableEntry commandTable[] = { GLES_GPU::GLES_GPU() : resized_(false) { +#ifdef _WIN32 lastVsync_ = g_Config.bVSync ? 1 : 0; if (gl_extensions.EXT_swap_control_tear) { // See http://developer.download.nvidia.com/opengl/specs/WGL_EXT_swap_control_tear.txt @@ -384,6 +385,7 @@ GLES_GPU::GLES_GPU() } else { glstate.SetVSyncInterval(g_Config.bVSync ? 1 : 0); } +#endif shaderManager_ = new ShaderManager(); transformDraw_.SetShaderManager(shaderManager_); @@ -495,6 +497,7 @@ void GLES_GPU::BeginFrame() { } void GLES_GPU::BeginFrameInternal() { +#ifdef _WIN32 // Turn off vsync when unthrottled int desiredVSyncInterval = g_Config.bVSync ? 1 : 0; if ((PSP_CoreParameter().unthrottle) || (PSP_CoreParameter().fpsLimit == 1)) @@ -510,6 +513,7 @@ void GLES_GPU::BeginFrameInternal() { } lastVsync_ = desiredVSyncInterval; } +#endif textureCache_.StartFrame(); transformDraw_.DecimateTrackedVertexArrays(); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 57915863cd..8fa6751ef1 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -217,13 +217,10 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointerAdd(new PopupMultiChoice(&g_Config.iInternalResolution, gs->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gs, screenManager()))->OnClick.Handle(this, &GameSettingsScreen::OnResolutionChange); +#ifdef _WIN32 graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync"))); +#endif graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform"))); graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache"))); graphicsSettings->Add(new CheckBox(&g_Config.bLowQualitySplineBezier, gs->T("LowCurves", "Low quality spline/bezier curves")));