src/video/cocoa/SDL_cocoaopengl.m
changeset 1973 81255f93dfcd
parent 1970 db3ba6c0d0df
child 2178 114a541cfae2
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Sun Aug 06 07:29:38 2006 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Sun Aug 06 08:55:37 2006 +0000
     1.3 @@ -247,11 +247,6 @@
     1.4  
     1.5      /* End Wisdom from Apple Engineer section. --ryan. */
     1.6  
     1.7 -    /* FIXME: should this go somewhere else? */
     1.8 -    if (window->flags & SDL_WINDOW_FULLSCREEN) {
     1.9 -        [nscontext setFullScreen];
    1.10 -    }
    1.11 -
    1.12      [pool release];
    1.13      return nscontext;
    1.14  }
    1.15 @@ -267,8 +262,12 @@
    1.16          SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
    1.17          NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
    1.18  
    1.19 -        [nscontext setView:[windowdata->window contentView]];
    1.20 -        [nscontext update];
    1.21 +        if (window->flags & SDL_WINDOW_FULLSCREEN) {
    1.22 +            [nscontext setFullScreen];
    1.23 +        } else {
    1.24 +            [nscontext setView:[windowdata->window contentView]];
    1.25 +            [nscontext update];
    1.26 +        }
    1.27          [nscontext makeCurrentContext];
    1.28      } else {
    1.29          [NSOpenGLContext clearCurrentContext];