From 5ea198f987cd6598f6873fb6bfaa192574f5fe7e Mon Sep 17 00:00:00 2001 From: "J?rgen P. Tjern?" Date: Tue, 9 Jul 2013 12:57:12 -0700 Subject: [PATCH] Mac: Remove dead FULLSCREEN_TOGGLEABLE code. This code was written almost 2 years ago, and the flag hasn't been changed since. Cleaning up the code by removing the conditional blocks, so that they behave the same way they have for the past two years. FULLSCREEN_TOGGLEABLE used to cause us to use -[NSOpenGLContext setFullScreen] and a pixel format with NSOpenGLPFAFullScreen. --- src/video/cocoa/SDL_cocoaopengl.h | 3 --- src/video/cocoa/SDL_cocoaopengl.m | 11 ----------- src/video/cocoa/SDL_cocoawindow.m | 2 -- 3 files changed, 16 deletions(-) diff --git a/src/video/cocoa/SDL_cocoaopengl.h b/src/video/cocoa/SDL_cocoaopengl.h index 4c4005be7..77bdf4449 100644 --- a/src/video/cocoa/SDL_cocoaopengl.h +++ b/src/video/cocoa/SDL_cocoaopengl.h @@ -25,9 +25,6 @@ #if SDL_VIDEO_OPENGL_CGL -/* Define this if you want to be able to toggle fullscreen mode seamlessly */ -#define FULLSCREEN_TOGGLEABLE - struct SDL_GLDriverData { int initialized; diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m index 589fb1dd7..84f89639d 100644 --- a/src/video/cocoa/SDL_cocoaopengl.m +++ b/src/video/cocoa/SDL_cocoaopengl.m @@ -119,12 +119,6 @@ attr[i++] = profile; } -#ifndef FULLSCREEN_TOGGLEABLE - if (window->flags & SDL_WINDOW_FULLSCREEN) { - attr[i++] = NSOpenGLPFAFullScreen; - } -#endif - attr[i++] = NSOpenGLPFAColorSize; attr[i++] = SDL_BYTESPERPIXEL(display->current_mode.format)*8; @@ -218,11 +212,6 @@ SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata; NSOpenGLContext *nscontext = (NSOpenGLContext *)context; -#ifndef FULLSCREEN_TOGGLEABLE - if (window->flags & SDL_WINDOW_FULLSCREEN) { - [nscontext setFullScreen]; - } else -#endif if ([nscontext view] != [windowdata->nswindow contentView]) { [nscontext setView:[windowdata->nswindow contentView]]; [nscontext update]; diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index bb30391fa..df3881407 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -1012,14 +1012,12 @@ - (void)resetCursorRects Cocoa_SetWindowTitle(_this, window); } -#ifdef FULLSCREEN_TOGGLEABLE if (SDL_ShouldAllowTopmost() && fullscreen) { /* OpenGL is rendering to the window, so make it visible! */ [nswindow setLevel:CGShieldingWindowLevel()]; } else { [nswindow setLevel:kCGNormalWindowLevel]; } -#endif [data->listener pauseVisibleObservation]; [nswindow makeKeyAndOrderFront:nil];