Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Mac: Remove dead FULLSCREEN_TOGGLEABLE code.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jorgenpt committed Jul 9, 2013
1 parent 2d54d66 commit 5ea198f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions src/video/cocoa/SDL_cocoaopengl.h
Expand Up @@ -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;
Expand Down
11 changes: 0 additions & 11 deletions src/video/cocoa/SDL_cocoaopengl.m
Expand Up @@ -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;

Expand Down Expand Up @@ -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];
Expand Down
2 changes: 0 additions & 2 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -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];
Expand Down

0 comments on commit 5ea198f

Please sign in to comment.