src/video/quartz/SDL_QuartzVideo.m
branchSDL-1.2
changeset 6173 5619adf4736d
parent 6158 6f3a2bb301d6
child 6228 adbb020cb5a2
equal deleted inserted replaced
6170:044ca54328b4 6173:5619adf4736d
   835 
   835 
   836         [ [ qz_window contentView ] addSubview:window_view ];
   836         [ [ qz_window contentView ] addSubview:window_view ];
   837 
   837 
   838         /* Apparently Lion checks some version flag set by the linker
   838         /* Apparently Lion checks some version flag set by the linker
   839            and changes API behavior. Annoying. */
   839            and changes API behavior. Annoying. */
   840 #if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
   840         if ( isLion ) {
   841         {
   841 		[ qz_window setLevel:CGShieldingWindowLevel() ];
       
   842 		[ gl_context setView: window_view ];
       
   843 		[ gl_context setFullScreen ];
       
   844 		[ gl_context update ];
       
   845 	} else {
   842             CGLError err;
   846             CGLError err;
   843             CGLContextObj ctx;
   847             CGLContextObj ctx;
   844 
   848 
   845             [ qz_window setLevel:NSNormalWindowLevel ];
   849             [ qz_window setLevel:NSNormalWindowLevel ];
   846             ctx = QZ_GetCGLContextObj (gl_context);
   850             ctx = QZ_GetCGLContextObj (gl_context);
   848     
   852     
   849             if (err) {
   853             if (err) {
   850                 SDL_SetError ("Error setting OpenGL fullscreen: %s", CGLErrorString(err));
   854                 SDL_SetError ("Error setting OpenGL fullscreen: %s", CGLErrorString(err));
   851                 goto ERR_NO_GL;
   855                 goto ERR_NO_GL;
   852             }
   856             }
   853         }
   857 	}
   854 #else
       
   855         [ qz_window setLevel:CGShieldingWindowLevel() ];
       
   856         [ gl_context setView: window_view ];
       
   857         [ gl_context setFullScreen ];
       
   858         [ gl_context update ];
       
   859 #endif
       
   860 
   858 
   861         [ window_view release ];
   859         [ window_view release ];
   862         [ gl_context makeCurrentContext];
   860         [ gl_context makeCurrentContext];
   863 
   861 
   864         glClear (GL_COLOR_BUFFER_BIT);
   862         glClear (GL_COLOR_BUFFER_BIT);