Mac: Remove dead FULLSCREEN_TOGGLEABLE code.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Tue, 09 Jul 2013 12:57:12 -0700
changeset 7389361d1a0c90f6
parent 7388 058097637b4c
child 7390 e4b98404baa4
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
src/video/cocoa/SDL_cocoaopengl.m
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoaopengl.h	Tue Jul 09 13:54:29 2013 -0300
     1.2 +++ b/src/video/cocoa/SDL_cocoaopengl.h	Tue Jul 09 12:57:12 2013 -0700
     1.3 @@ -25,9 +25,6 @@
     1.4  
     1.5  #if SDL_VIDEO_OPENGL_CGL
     1.6  
     1.7 -/* Define this if you want to be able to toggle fullscreen mode seamlessly */
     1.8 -#define FULLSCREEN_TOGGLEABLE
     1.9 -
    1.10  struct SDL_GLDriverData
    1.11  {
    1.12      int initialized;
     2.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Tue Jul 09 13:54:29 2013 -0300
     2.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Tue Jul 09 12:57:12 2013 -0700
     2.3 @@ -119,12 +119,6 @@
     2.4          attr[i++] = profile;
     2.5      }
     2.6  
     2.7 -#ifndef FULLSCREEN_TOGGLEABLE
     2.8 -    if (window->flags & SDL_WINDOW_FULLSCREEN) {
     2.9 -        attr[i++] = NSOpenGLPFAFullScreen;
    2.10 -    }
    2.11 -#endif
    2.12 -
    2.13      attr[i++] = NSOpenGLPFAColorSize;
    2.14      attr[i++] = SDL_BYTESPERPIXEL(display->current_mode.format)*8;
    2.15  
    2.16 @@ -218,11 +212,6 @@
    2.17          SDL_WindowData *windowdata = (SDL_WindowData *)window->driverdata;
    2.18          NSOpenGLContext *nscontext = (NSOpenGLContext *)context;
    2.19  
    2.20 -#ifndef FULLSCREEN_TOGGLEABLE
    2.21 -        if (window->flags & SDL_WINDOW_FULLSCREEN) {
    2.22 -            [nscontext setFullScreen];
    2.23 -        } else
    2.24 -#endif
    2.25          if ([nscontext view] != [windowdata->nswindow contentView]) {
    2.26              [nscontext setView:[windowdata->nswindow contentView]];
    2.27              [nscontext update];
     3.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Tue Jul 09 13:54:29 2013 -0300
     3.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Tue Jul 09 12:57:12 2013 -0700
     3.3 @@ -1012,14 +1012,12 @@
     3.4          Cocoa_SetWindowTitle(_this, window);
     3.5      }
     3.6  
     3.7 -#ifdef FULLSCREEN_TOGGLEABLE
     3.8      if (SDL_ShouldAllowTopmost() && fullscreen) {
     3.9          /* OpenGL is rendering to the window, so make it visible! */
    3.10          [nswindow setLevel:CGShieldingWindowLevel()];
    3.11      } else {
    3.12          [nswindow setLevel:kCGNormalWindowLevel];
    3.13      }
    3.14 -#endif
    3.15  
    3.16      [data->listener pauseVisibleObservation];
    3.17      [nswindow makeKeyAndOrderFront:nil];