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.
This commit is contained in:
Jørgen P. Tjernø
2013-07-09 12:57:12 -07:00
parent 9bc1b31fd3
commit 87ab2c5325
3 changed files with 0 additions and 16 deletions

View File

@@ -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;

View File

@@ -119,12 +119,6 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
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 @@ Cocoa_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
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];

View File

@@ -1012,14 +1012,12 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
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];