diff src/video/cocoa/SDL_cocoaopengl.m @ 1973:81255f93dfcd

Fixed fullscreen modes with Cocoa video driver.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 06 Aug 2006 08:55:37 +0000
parents db3ba6c0d0df
children 114a541cfae2
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoaopengl.m	Sun Aug 06 07:29:38 2006 +0000
+++ b/src/video/cocoa/SDL_cocoaopengl.m	Sun Aug 06 08:55:37 2006 +0000
@@ -247,11 +247,6 @@
 
     /* End Wisdom from Apple Engineer section. --ryan. */
 
-    /* FIXME: should this go somewhere else? */
-    if (window->flags & SDL_WINDOW_FULLSCREEN) {
-        [nscontext setFullScreen];
-    }
-
     [pool release];
     return nscontext;
 }
@@ -267,8 +262,12 @@
         SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
         NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
 
-        [nscontext setView:[windowdata->window contentView]];
-        [nscontext update];
+        if (window->flags & SDL_WINDOW_FULLSCREEN) {
+            [nscontext setFullScreen];
+        } else {
+            [nscontext setView:[windowdata->window contentView]];
+            [nscontext update];
+        }
         [nscontext makeCurrentContext];
     } else {
         [NSOpenGLContext clearCurrentContext];