Skip to content

Commit

Permalink
Merge pull request #7 from okamstudio/master
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
ricpelo committed May 6, 2015
2 parents 7bb5383 + fbd9839 commit 1ae03fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 0 additions & 2 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
10 changes: 9 additions & 1 deletion platform/osx/os_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,10 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer

[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 ***/
Expand Down Expand Up @@ -1310,14 +1312,20 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer

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;
};
Expand Down

0 comments on commit 1ae03fd

Please sign in to comment.