src/video/quartz/SDL_QuartzVideo.m
branchSDL-1.2
changeset 6048 a0538c8c39b5
parent 5986 4854219a91e9
child 6049 4b79fd1fd9a3
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Thu Nov 03 12:42:23 2011 -0400
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Thu Nov 03 23:58:24 2011 -0400
     1.3 @@ -798,9 +798,6 @@
     1.4      /* Setup OpenGL for a fullscreen context */
     1.5      if (flags & SDL_OPENGL) {
     1.6  
     1.7 -        CGLError err;
     1.8 -        CGLContextObj ctx;
     1.9 -
    1.10          if ( ! QZ_SetupOpenGL (this, bpp, flags) ) {
    1.11              goto ERR_NO_GL;
    1.12          }
    1.13 @@ -818,13 +815,18 @@
    1.14          /* Apparently Lion checks some version flag set by the linker
    1.15             and changes API behavior. Annoying. */
    1.16  #if (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
    1.17 -        [ qz_window setLevel:NSNormalWindowLevel ];
    1.18 -        ctx = QZ_GetCGLContextObj (gl_context);
    1.19 -        err = CGLSetFullScreen (ctx);
    1.20 +        {
    1.21 +            CGLError err;
    1.22 +            CGLContextObj ctx;
    1.23 +
    1.24 +            [ qz_window setLevel:NSNormalWindowLevel ];
    1.25 +            ctx = QZ_GetCGLContextObj (gl_context);
    1.26 +            err = CGLSetFullScreen (ctx);
    1.27      
    1.28 -        if (err) {
    1.29 -            SDL_SetError ("Error setting OpenGL fullscreen: %s", CGLErrorString(err));
    1.30 -            goto ERR_NO_GL;
    1.31 +            if (err) {
    1.32 +                SDL_SetError ("Error setting OpenGL fullscreen: %s", CGLErrorString(err));
    1.33 +                goto ERR_NO_GL;
    1.34 +            }
    1.35          }
    1.36  #else
    1.37          [ qz_window setLevel:CGShieldingWindowLevel() ];