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.
--- a/src/video/cocoa/SDL_cocoaopengl.h Tue Jul 09 13:54:29 2013 -0300
+++ b/src/video/cocoa/SDL_cocoaopengl.h Tue Jul 09 12:57:12 2013 -0700
@@ -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;
--- a/src/video/cocoa/SDL_cocoaopengl.m Tue Jul 09 13:54:29 2013 -0300
+++ b/src/video/cocoa/SDL_cocoaopengl.m Tue Jul 09 12:57:12 2013 -0700
@@ -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];
--- a/src/video/cocoa/SDL_cocoawindow.m Tue Jul 09 13:54:29 2013 -0300
+++ b/src/video/cocoa/SDL_cocoawindow.m Tue Jul 09 12:57:12 2013 -0700
@@ -1012,14 +1012,12 @@
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];