From 1d619fad86d0f74afa783b63864b16c12e34d173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20P=C3=A9rez?= Date: Tue, 5 May 2015 12:02:47 +0200 Subject: Really fixes fullscreen mode in OS X, even during startup --- platform/osx/os_osx.mm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; }; -- cgit v1.2.3 From 605b783708f9270670c38d9ad39d7ae88d38101b Mon Sep 17 00:00:00 2001 From: "Daniel T. Borelli" Date: Tue, 28 Apr 2015 22:11:04 -0300 Subject: fix delete packed data --- main/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index a822418eaa..aa4a4b8919 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -748,8 +748,6 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas if (file_access_network_client) memdelete(file_access_network_client); - if (packed_data) - memdelete( packed_data ); #ifdef MINIZIP_ENABLED if (zip_packed_data) memdelete( zip_packed_data ); -- cgit v1.2.3 From 979b931995df4c7da80702ce9652862267b1023d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20P=C3=A9rez?= Date: Wed, 6 May 2015 12:53:55 +0200 Subject: Better OS X fullscreen support, without the nasty startup effect --- platform/osx/os_osx.mm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 03e643db6f..eb2a12cdef 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -969,7 +969,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi [window_object makeKeyAndOrderFront:nil]; if (p_desired.fullscreen) - set_window_fullscreen(true); + zoomed = true; /*** END OSX INITIALIZATION ***/ /*** END OSX INITIALIZATION ***/ @@ -1312,11 +1312,13 @@ void OS_OSX::set_window_size(const Size2 p_size) { void OS_OSX::set_window_fullscreen(bool p_enabled) { + if (zoomed != p_enabled) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - [window_object toggleFullScreen:nil]; + [window_object toggleFullScreen:nil]; #else - [window_object performZoom:nil]; + [window_object performZoom:nil]; #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ + } zoomed = p_enabled; }; @@ -1517,6 +1519,11 @@ void OS_OSX::run() { main_loop->init(); + if (zoomed) { + zoomed = false; + set_window_fullscreen(true); + } + // uint64_t last_ticks=get_ticks_usec(); // int frames=0; -- cgit v1.2.3