This fixes SDL_renderer_gl so that it builds with c89.
authorSam Lantinga
Sat, 16 Oct 2010 17:14:04 -0700
changeset 49059779093454d2
parent 4904 c0021a587dc7
child 4906 67acc9ab60ff
This fixes SDL_renderer_gl so that it builds with c89.
From: Fran├žois Revol <revol@free.fr>
Checked By: Scott McCreary <scottmc2@gmail.com>
src/video/SDL_renderer_gl.c
     1.1 --- a/src/video/SDL_renderer_gl.c	Sun Oct 10 15:45:58 2010 -0700
     1.2 +++ b/src/video/SDL_renderer_gl.c	Sat Oct 16 17:14:04 2010 -0700
     1.3 @@ -1181,6 +1181,8 @@
     1.4          }
     1.5          data->glEnd();
     1.6      } else {
     1.7 +        int x1, y1, x2, y2;
     1.8 +
     1.9          data->glBegin(GL_LINE_STRIP);
    1.10          for (i = 0; i < count; ++i) {
    1.11              data->glVertex2f(0.5f + points[i].x, 0.5f + points[i].y);
    1.12 @@ -1200,10 +1202,10 @@
    1.13          data->glVertex2f(0.5f + points[count-1].x, 0.5f + points[count-1].y);
    1.14  #else
    1.15          /* Linux seems to leave the right-most or bottom-most point open */
    1.16 -        int x1 = points[0].x;
    1.17 -        int y1 = points[0].y;
    1.18 -        int x2 = points[count-1].x;
    1.19 -        int y2 = points[count-1].y;
    1.20 +        x1 = points[0].x;
    1.21 +        y1 = points[0].y;
    1.22 +        x2 = points[count-1].x;
    1.23 +        y2 = points[count-1].y;
    1.24  
    1.25          if (x1 > x2) {
    1.26              data->glVertex2f(0.5f + x1, 0.5f + y1);