From fdaa2920eb21fff3320a17e9239e04dfadecdb00 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Apr 2015 14:38:54 -0300 Subject: Updated copyright year in all headers --- platform/osx/audio_driver_osx.cpp | 2 +- platform/osx/audio_driver_osx.h | 2 +- platform/osx/context_gl_osx.cpp | 2 +- platform/osx/context_gl_osx.h | 2 +- platform/osx/godot_main_osx.mm | 2 +- platform/osx/godot_osx.h | 2 +- platform/osx/godot_osx.mm | 2 +- platform/osx/os_osx.h | 2 +- platform/osx/os_osx.mm | 2 +- platform/osx/platform_config.h | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'platform/osx') diff --git a/platform/osx/audio_driver_osx.cpp b/platform/osx/audio_driver_osx.cpp index 638ac7e504..6904b7a398 100644 --- a/platform/osx/audio_driver_osx.cpp +++ b/platform/osx/audio_driver_osx.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/audio_driver_osx.h b/platform/osx/audio_driver_osx.h index c0336eb816..bcf6b23864 100644 --- a/platform/osx/audio_driver_osx.h +++ b/platform/osx/audio_driver_osx.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/context_gl_osx.cpp b/platform/osx/context_gl_osx.cpp index 9c2cd16b49..f856e1e4a8 100644 --- a/platform/osx/context_gl_osx.cpp +++ b/platform/osx/context_gl_osx.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/context_gl_osx.h b/platform/osx/context_gl_osx.h index 54da42b331..770ec74737 100644 --- a/platform/osx/context_gl_osx.h +++ b/platform/osx/context_gl_osx.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/godot_main_osx.mm b/platform/osx/godot_main_osx.mm index 3546c1e71a..92fa6ddbc2 100644 --- a/platform/osx/godot_main_osx.mm +++ b/platform/osx/godot_main_osx.mm @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/godot_osx.h b/platform/osx/godot_osx.h index ebac475089..270ba9966f 100644 --- a/platform/osx/godot_osx.h +++ b/platform/osx/godot_osx.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/godot_osx.mm b/platform/osx/godot_osx.mm index fb3c5808c7..39119393ff 100644 --- a/platform/osx/godot_osx.mm +++ b/platform/osx/godot_osx.mm @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 9ffd4fc3f8..1e9a7e89e8 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index a20263f9b2..dd19dbbff6 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index da4265f3cf..285d8d0c02 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3 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(-) (limited to 'platform/osx') 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 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(-) (limited to 'platform/osx') 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 From 9df77d276593ef7082e3971d1c180b8f74b0cb2e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 26 May 2015 01:05:08 -0300 Subject: ability to run 2D physics in a thread also, 2D physics is now thread safe too. see physics_2d/thread_model --- platform/osx/os_osx.h | 1 + platform/osx/os_osx.mm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'platform/osx') diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 1e9a7e89e8..144037b1cb 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -44,6 +44,7 @@ #include "drivers/rtaudio/audio_driver_rtaudio.h" #include "drivers/alsa/audio_driver_alsa.h" #include "servers/physics_2d/physics_2d_server_sw.h" +#include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include "platform/osx/audio_driver_osx.h" #include diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index eb2a12cdef..e2ff8d1116 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1015,7 +1015,8 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi // physics_server = memnew( PhysicsServerSW ); physics_server->init(); - physics_2d_server = memnew( Physics2DServerSW ); + //physics_2d_server = memnew( Physics2DServerSW ); + physics_2d_server = Physics2DServerWrapMT::init_server(); physics_2d_server->init(); input = memnew( InputDefault ); -- cgit v1.2.3 From 2f33f820e995ec080fc4a4f36e7cbe3c139613b0 Mon Sep 17 00:00:00 2001 From: James McLean Date: Mon, 22 Jun 2015 00:56:49 -0400 Subject: Fixed compilation error on MacOS X. --- platform/osx/os_osx.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'platform/osx') diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index e2ff8d1116..72699366c4 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1113,7 +1113,9 @@ void OS_OSX::warp_mouse_pos(const Point2& p_to) { NSPoint localPoint = { p_to.x, p_to.y }; NSPoint pointInWindow = [window_view convertPoint:localPoint toView:nil]; - NSPoint pointOnScreen = [[window_view window] convertRectToScreen:(NSRect){.origin=pointInWindow}].origin; + NSRect pointInWindowRect; + pointInWindowRect.origin = pointInWindow; + NSPoint pointOnScreen = [[window_view window] convertRectToScreen:pointInWindowRect].origin; //point in scren coords CGPoint lMouseWarpPos = { pointOnScreen.x, pointOnScreen.y}; -- cgit v1.2.3