src/video/cocoa/SDL_cocoaopengl.m
changeset 5249 7a963be087ef
parent 5246 58265e606e4e
child 5262 b530ef003506
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Thu Feb 10 22:49:14 2011 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Fri Feb 11 00:25:44 2011 -0800
     1.3 @@ -81,9 +81,11 @@
     1.4  
     1.5      pool = [[NSAutoreleasePool alloc] init];
     1.6  
     1.7 +#ifndef FULLSCREEN_TOGGLEABLE
     1.8      if (window->flags & SDL_WINDOW_FULLSCREEN) {
     1.9          attr[i++] = NSOpenGLPFAFullScreen;
    1.10      }
    1.11 +#endif
    1.12  
    1.13      attr[i++] = NSOpenGLPFAColorSize;
    1.14      attr[i++] = SDL_BYTESPERPIXEL(display->current_mode.format)*8;
    1.15 @@ -199,9 +201,12 @@
    1.16          SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
    1.17          NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
    1.18  
    1.19 +#ifndef FULLSCREEN_TOGGLEABLE
    1.20          if (window->flags & SDL_WINDOW_FULLSCREEN) {
    1.21              [nscontext setFullScreen];
    1.22 -        } else {
    1.23 +        } else
    1.24 +#endif
    1.25 +        {
    1.26              [nscontext setView:[windowdata->nswindow contentView]];
    1.27              [nscontext update];
    1.28          }