Skip to content

Commit

Permalink
Actually fix the glViewport, this time, I think.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Nov 26, 2015
1 parent d63cf5b commit 1d0cad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/con_sdl.cpp
Expand Up @@ -354,7 +354,7 @@ static int SetupSDLWindow(int argc, char **argv) {

int drawablew, drawableh;
SDL_GL_GetDrawableSize(win, &drawablew, &drawableh);
glViewport(0, 0, drawablew, drawableh);
glViewport(0, drawableh % FontCY, drawablew - (drawablew % FontCX), drawableh - (drawableh % FontCY));

// set up a palette in the GL.
if (SDL_ISPIXELFORMAT_INDEXED(surface->format->format))
Expand Down Expand Up @@ -810,7 +810,7 @@ int ConSetSize(int X, int Y) {
glBufferData(GL_ARRAY_BUFFER, ScreenCols * ScreenRows * 7 * 4, NULL, GL_DYNAMIC_DRAW);
int drawablew, drawableh;
SDL_GL_GetDrawableSize(win, &drawablew, &drawableh);
glViewport(0, 0, drawablew, drawableh);
glViewport(0, drawableh % FontCY, drawablew - (drawablew % FontCX), drawableh - (drawableh % FontCY));
#endif

return 0;
Expand Down

0 comments on commit 1d0cad2

Please sign in to comment.