2
0
Эх сурвалжийг харах

Merge pull request #7 from okamstudio/master

Sync
Ricardo Pérez 10 жил өмнө
parent
commit
1ae03fd39d

+ 0 - 2
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)
 	if (file_access_network_client)
 		memdelete(file_access_network_client);
 		memdelete(file_access_network_client);
 
 
-	if (packed_data)
-		memdelete( packed_data );
 #ifdef MINIZIP_ENABLED
 #ifdef MINIZIP_ENABLED
 	if (zip_packed_data)
 	if (zip_packed_data)
 		memdelete( zip_packed_data );
 		memdelete( zip_packed_data );

+ 9 - 1
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];
 	[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 ***/
 	/*** 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) {
 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];
 	[window_object performZoom:nil];
+#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
 	zoomed = p_enabled;
 	zoomed = p_enabled;
 };
 };
 
 
 bool OS_OSX::is_window_fullscreen() const {
 bool OS_OSX::is_window_fullscreen() const {
 
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
 	if ( [window_object respondsToSelector:@selector(isZoomed)] )
 	if ( [window_object respondsToSelector:@selector(isZoomed)] )
 		return [window_object isZoomed];
 		return [window_object isZoomed];
+#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
 
 
 	return zoomed;
 	return zoomed;
 };
 };