src/video/SDL_video.c
changeset 3139 7f684f249ec9
parent 3100 7dc982143c06
child 3141 3df74541339b
child 3161 494559cc723b
     1.1 --- a/src/video/SDL_video.c	Fri May 15 15:47:37 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Sat May 23 22:41:08 2009 +0000
     1.3 @@ -1496,10 +1496,9 @@
     1.4      window->renderer = SDL_CurrentDisplay.render_drivers[index]
     1.5          .CreateRenderer(window, flags);
     1.6  
     1.7 -    if (window->renderer==NULL)
     1.8 -    {
     1.9 -       /* Assuming renderer set its error */
    1.10 -       return -1;
    1.11 +    if (window->renderer == NULL) {
    1.12 +        /* Assuming renderer set its error */
    1.13 +        return -1;
    1.14      }
    1.15  
    1.16      SDL_SelectRenderer(window->id);
    1.17 @@ -2719,7 +2718,7 @@
    1.18  {
    1.19  #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES
    1.20      void (APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params);
    1.21 -    GLenum (APIENTRY * glGetErrorFunc) (void);
    1.22 +    GLenum(APIENTRY * glGetErrorFunc) (void);
    1.23      GLenum attrib = 0;
    1.24      GLenum error = 0;
    1.25  
    1.26 @@ -2734,7 +2733,7 @@
    1.27      }
    1.28  
    1.29      /* Clear value in any case */
    1.30 -    *value=0;
    1.31 +    *value = 0;
    1.32  
    1.33      switch (attr) {
    1.34      case SDL_GL_RETAINED_BACKING:
    1.35 @@ -2842,28 +2841,26 @@
    1.36      }
    1.37  
    1.38      glGetIntegervFunc(attrib, (GLint *) value);
    1.39 -    error=glGetErrorFunc();
    1.40 -    if (error!=GL_NO_ERROR)
    1.41 -    {
    1.42 -       switch (error)
    1.43 -       {
    1.44 -          case GL_INVALID_ENUM:
    1.45 -               {
    1.46 -                  SDL_SetError("OpenGL error: GL_INVALID_ENUM");
    1.47 -               }
    1.48 -               break;
    1.49 -          case GL_INVALID_VALUE:
    1.50 -               {
    1.51 -                  SDL_SetError("OpenGL error: GL_INVALID_VALUE");
    1.52 -               }
    1.53 -               break;
    1.54 -          default:
    1.55 -               {
    1.56 -                  SDL_SetError("OpenGL error: %08X", error);
    1.57 -               }
    1.58 -               break;
    1.59 -       }
    1.60 -       return -1;
    1.61 +    error = glGetErrorFunc();
    1.62 +    if (error != GL_NO_ERROR) {
    1.63 +        switch (error) {
    1.64 +        case GL_INVALID_ENUM:
    1.65 +            {
    1.66 +                SDL_SetError("OpenGL error: GL_INVALID_ENUM");
    1.67 +            }
    1.68 +            break;
    1.69 +        case GL_INVALID_VALUE:
    1.70 +            {
    1.71 +                SDL_SetError("OpenGL error: GL_INVALID_VALUE");
    1.72 +            }
    1.73 +            break;
    1.74 +        default:
    1.75 +            {
    1.76 +                SDL_SetError("OpenGL error: %08X", error);
    1.77 +            }
    1.78 +            break;
    1.79 +        }
    1.80 +        return -1;
    1.81      }
    1.82      return 0;
    1.83  #else