diff options
author | punto- <ariel@okamstudio.com> | 2015-05-06 04:36:57 -0300 |
---|---|---|
committer | punto- <ariel@okamstudio.com> | 2015-05-06 04:36:57 -0300 |
commit | fbd98391315573a29c36099dfadc4c2cdeb42ba6 (patch) | |
tree | e87ae60e13bedfdb49c9d1cb56f51f4c8da02071 | |
parent | e2419f74d9ec71c2568e55d79b05e2237f4255f4 (diff) | |
parent | 1d619fad86d0f74afa783b63864b16c12e34d173 (diff) |
Merge pull request #1818 from ricpelo/ricpelo-patch-5
Really fixes fullscreen mode in OS X, even during startup
-rw-r--r-- | platform/osx/os_osx.mm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index dd19dbbff6..03e643db6f 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -966,8 +966,10 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi [NSApp activateIgnoringOtherApps:YES]; - [window_object makeKeyAndOrderFront:nil]; + [window_object makeKeyAndOrderFront:nil]; + if (p_desired.fullscreen) + set_window_fullscreen(true); /*** END OSX INITIALIZATION ***/ /*** END OSX INITIALIZATION ***/ @@ -1310,14 +1312,20 @@ void OS_OSX::set_window_size(const Size2 p_size) { void OS_OSX::set_window_fullscreen(bool p_enabled) { +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 + [window_object toggleFullScreen:nil]; +#else [window_object performZoom:nil]; +#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ zoomed = p_enabled; }; bool OS_OSX::is_window_fullscreen() const { +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 if ( [window_object respondsToSelector:@selector(isZoomed)] ) return [window_object isZoomed]; +#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ return zoomed; }; |