From f36396929ac1a66e2e3aad800beddc17bb809a65 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Sat, 31 Aug 2013 20:17:29 +0000 Subject: [PATCH] (svn r25751) -Fix (r25657): [OSX] Restore fullscreen state also when starting on 10.7+. --- src/video/cocoa/cocoa_v.mm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 13264d6b1a..3f8413d03b 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -321,18 +321,12 @@ static CocoaSubdriver *QZ_CreateSubdriver(int width, int height, int bpp, bool f /* OSX 10.7 allows to toggle fullscreen mode differently */ if (MacOSVersionIsAtLeast(10, 7, 0)) { ret = QZ_CreateWindowSubdriver(width, height, bpp); + if (ret != NULL && fullscreen) ret->ToggleFullscreen(); } else { ret = fullscreen ? QZ_CreateFullscreenSubdriver(width, height, bpp) : QZ_CreateWindowSubdriver(width, height, bpp); } - if (ret != NULL) { - /* We cannot set any fullscreen mode on OSX 10.7 when not compiled against SDK 10.7 */ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - if (fullscreen) { ret->ToggleFullscreen(); } -#endif - return ret; - } - + if (ret != NULL) return ret; if (!fallback) return NULL; /* Try again in 640x480 windowed */