Fix viewport being upside down in OpenGL renderer.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 15 Nov 2013 23:20:50 -0500
changeset 7992 6558e2b68c03
parent 7990 a05a48e493c0
child 7993 771138df6c62
Fix viewport being upside down in OpenGL renderer. Fixes Bugzilla #2207.
src/render/opengl/SDL_render_gl.c
--- a/src/render/opengl/SDL_render_gl.c	Thu Nov 14 22:26:49 2013 -0800
+++ b/src/render/opengl/SDL_render_gl.c	Fri Nov 15 23:20:50 2013 -0500
@@ -925,7 +925,7 @@
     data->glMatrixMode(GL_PROJECTION);
     data->glLoadIdentity();
     if (renderer->viewport.w && renderer->viewport.h) {
-        if (renderer->target) {
+        if (!renderer->target) {
             data->glOrtho((GLdouble) 0,
                           (GLdouble) renderer->viewport.w,
                           (GLdouble) 0,