Skip to content

Commit

Permalink
Fixed black borders in GL renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
Grumbel committed Jul 30, 2014
1 parent 02aef44 commit cb11958
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/video/gl/gl_renderer.cpp
Expand Up @@ -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),
Expand Down

0 comments on commit cb11958

Please sign in to comment.