From 9fb6acc92db0d962a56897517c8a15c9ba1eab1c Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Wed, 22 Mar 2017 20:38:44 +0000 Subject: [PATCH] fix scissor code for native resolution (thanks HarryTuttle) --- Src/OSD/SDL/Main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index 1fba8d9..46ea505 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -141,15 +141,12 @@ static bool SetGLGeometry(unsigned *xOffsetPtr, unsigned *yOffsetPtr, unsigned * glEnable(GL_SCISSOR_TEST); // Scissor box (to clip visible area) - if (!g_Config.wideScreen) + if (g_Config.wideScreen) { - if (VideoInfo->current_w > int(*xResPtr) || VideoInfo->current_h > int(*yResPtr)) - { - glScissor(*xOffsetPtr + correction, *yOffsetPtr + correction, *xResPtr - (correction*2), *yResPtr - (correction*2)); - } + glScissor(0, correction, *totalXResPtr, *totalYResPtr - (correction * 2)); } else { - glScissor(0, correction, *totalXResPtr, *totalYResPtr - (correction * 2)); + glScissor(*xOffsetPtr + correction, *yOffsetPtr + correction, *xResPtr - (correction * 2), *yResPtr - (correction * 2)); } return OKAY; }