From 347e86a98aed04c6869b122c201506476eb3890e Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 17 Jul 2012 22:39:16 +0200 Subject: Fixed pixel alignment drawing glitches in OpenGL mode At some window sizes, lines would flicker in between the tiles. This happened when the window size was not dividable by the scaling factor. Fixed by setting a slightly smaller viewport in this case (which will hopefully not cause other issues). --- src/openglgraphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 65e24e51..ac412334 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -116,7 +116,7 @@ bool OpenGLGraphics::setVideoMode(int w, int h, int bpp, bool fs, bool hwaccel) #endif // Setup OpenGL - glViewport(0, 0, w, h); + glViewport(0, 0, mWidth * mScale, mHeight * mScale); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); int gotDoubleBuffer; SDL_GL_GetAttribute(SDL_GL_DOUBLEBUFFER, &gotDoubleBuffer); -- cgit v1.2.3-70-g09d2