diff options
author | michi_cc <michi_cc@openttd.org> | 2013-08-31 20:17:29 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2013-08-31 20:17:29 +0000 |
commit | f36396929ac1a66e2e3aad800beddc17bb809a65 (patch) | |
tree | c474ceeaef709127cb161790df5de2dc3ac3f555 | |
parent | 137bd4576ee777b3445d65431b2c1103ec73780a (diff) | |
download | openttd-f36396929ac1a66e2e3aad800beddc17bb809a65.tar.xz |
(svn r25751) -Fix (r25657): [OSX] Restore fullscreen state also when starting on 10.7+.
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 13264d6b1..3f8413d03 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 */ |