From 42a515ba76640589a59e1b35072c59ebfce126df Mon Sep 17 00:00:00 2001 From: omegadox Date: Sun, 9 Nov 2008 00:28:12 +0000 Subject: [PATCH] a small fix when not using stretch and a small code move git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1099 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 2 ++ Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 7e3a5396b0..52a54070ed 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -541,6 +541,8 @@ void OpenGL_Update() #elif defined(_WIN32) RECT rcWindow; if (!EmuWindow::GetParentWnd()) { + if (!g_Config.bStretchToFit) + return; GetWindowRect(EmuWindow::GetWnd(), &rcWindow); rcWindow.top += 25; } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 41ccfa8513..ea4a56544b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -576,6 +576,10 @@ void Renderer::FlushZBufferAlphaToTarget() TextureMngr::DisableStage(i); GL_REPORT_ERRORD(); + // setup the stencil to only accept pixels that have been written + glStencilFunc(GL_EQUAL, 1, 0xff); + glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); + if(g_Config.bStretchToFit) { //TODO: Do Correctly in a bit @@ -597,10 +601,6 @@ void Renderer::FlushZBufferAlphaToTarget() } else { - // setup the stencil to only accept pixels that have been written - glStencilFunc(GL_EQUAL, 1, 0xff); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - glBegin(GL_QUADS); glTexCoord2f(0, 0); glVertex2f(-1,-1); glTexCoord2f(0, (float)(GetTargetHeight())); glVertex2f(-1,1);