src/video/cocoa/SDL_cocoaopengl.m
changeset 7085 152cc7ddfa57
parent 7037 3fedf1f25b94
child 7108 732d2cac80c0
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Mon Apr 22 12:07:13 2013 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Mon Apr 22 12:07:16 2013 -0700
     1.3 @@ -238,16 +238,14 @@
     1.4          SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
     1.5          NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
     1.6  
     1.7 -        if (window->flags & SDL_WINDOW_SHOWN) {
     1.8  #ifndef FULLSCREEN_TOGGLEABLE
     1.9 -            if (window->flags & SDL_WINDOW_FULLSCREEN) {
    1.10 -                [nscontext setFullScreen];
    1.11 -            } else
    1.12 +        if (window->flags & SDL_WINDOW_FULLSCREEN) {
    1.13 +            [nscontext setFullScreen];
    1.14 +        } else
    1.15  #endif
    1.16 -            {
    1.17 -                [nscontext setView:[windowdata->nswindow contentView]];
    1.18 -                [nscontext update];
    1.19 -            }
    1.20 +        {
    1.21 +            [nscontext setView:[windowdata->nswindow contentView]];
    1.22 +            [nscontext update];
    1.23          }
    1.24          [nscontext makeCurrentContext];
    1.25      } else {
    1.26 @@ -310,10 +308,7 @@
    1.27      pool = [[NSAutoreleasePool alloc] init];
    1.28  
    1.29      /* FIXME: Do we need to get the context for the window? */
    1.30 -    nscontext = [NSOpenGLContext currentContext];
    1.31 -    if (nscontext != nil) {
    1.32 -        [nscontext flushBuffer];
    1.33 -    }
    1.34 +    [[NSOpenGLContext currentContext] flushBuffer];
    1.35  
    1.36      [pool release];
    1.37  }