src/render/opengles/SDL_render_gles.c
changeset 7239 04dda95ba22c
parent 7191 75360622e65f
child 7420 fe82b639c4d6
     1.1 --- a/src/render/opengles/SDL_render_gles.c	Mon May 27 21:44:16 2013 -0700
     1.2 +++ b/src/render/opengles/SDL_render_gles.c	Wed May 29 03:07:55 2013 -0700
     1.3 @@ -623,12 +623,14 @@
     1.4      data->glViewport(renderer->viewport.x, renderer->viewport.y,
     1.5                 renderer->viewport.w, renderer->viewport.h);
     1.6  
     1.7 -    data->glMatrixMode(GL_PROJECTION);
     1.8 -    data->glLoadIdentity();
     1.9 -    data->glOrthof((GLfloat) 0,
    1.10 -             (GLfloat) renderer->viewport.w,
    1.11 -             (GLfloat) renderer->viewport.h,
    1.12 -             (GLfloat) 0, 0.0, 1.0);
    1.13 +    if (renderer->viewport.w && renderer->viewport.h) {
    1.14 +        data->glMatrixMode(GL_PROJECTION);
    1.15 +        data->glLoadIdentity();
    1.16 +        data->glOrthof((GLfloat) 0,
    1.17 +                 (GLfloat) renderer->viewport.w,
    1.18 +                 (GLfloat) renderer->viewport.h,
    1.19 +                 (GLfloat) 0, 0.0, 1.0);
    1.20 +    }
    1.21      return 0;
    1.22  }
    1.23