Fixed black borders in GL renderer
authorIngo Ruhnke <grumbel@gmail.com>
Wed, 30 Jul 2014 17:38:33 +0000 (19:38 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Wed, 30 Jul 2014 17:38:33 +0000 (19:38 +0200)
src/video/gl/gl_renderer.cpp

index 9d20108..991e3aa 100644 (file)
@@ -581,13 +581,11 @@ GLRenderer::apply_config()
       SCREEN_HEIGHT = static_cast<int>(max_size.height);
     }
 
-#ifdef OLD_SDL1
     // Clear both buffers so that we get a clean black border without junk
     glClear(GL_COLOR_BUFFER_BIT);
-    SDL_GL_SwapWindow(screen);
+    SDL_GL_SwapWindow(window);
     glClear(GL_COLOR_BUFFER_BIT);
-    SDL_GL_SwapWindow(screen);
-#endif
+    SDL_GL_SwapWindow(window);
 
     glViewport(std::max(0, (screen_size.width  - new_size.width)  / 2),
                std::max(0, (screen_size.height - new_size.height) / 2),