summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/main/main.cpp b/main/main.cpp
index a53e52e485..fb42f71a75 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -61,7 +61,6 @@
#include "scene/main/window.h"
#include "scene/register_scene_types.h"
#include "scene/resources/packed_scene.h"
-#include "servers/arvr_server.h"
#include "servers/audio_server.h"
#include "servers/camera_server.h"
#include "servers/display_server.h"
@@ -72,6 +71,7 @@
#include "servers/register_server_types.h"
#include "servers/rendering/rendering_server_raster.h"
#include "servers/rendering/rendering_server_wrap_mt.h"
+#include "servers/xr_server.h"
#ifdef TOOLS_ENABLED
#include "editor/doc_data.h"
@@ -105,7 +105,7 @@ static AudioServer *audio_server = nullptr;
static DisplayServer *display_server = nullptr;
static RenderingServer *rendering_server = nullptr;
static CameraServer *camera_server = nullptr;
-static ARVRServer *arvr_server = nullptr;
+static XRServer *xr_server = nullptr;
static PhysicsServer3D *physics_server = nullptr;
static PhysicsServer2D *physics_2d_server = nullptr;
static NavigationServer3D *navigation_server = nullptr;
@@ -478,6 +478,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
I = args.front();
while (I) {
+#ifdef OSX_ENABLED
+ // Ignore the process serial number argument passed by macOS Gatekeeper.
+ // Otherwise, Godot would try to open a non-existent project on the first start and abort.
+ if (I->get().begins_with("-psn_")) {
+ I = I->next();
+ continue;
+ }
+#endif
List<String>::Element *N = I->next();
@@ -1297,8 +1305,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
audio_server = memnew(AudioServer);
audio_server->init();
- // also init our arvr_server from here
- arvr_server = memnew(ARVRServer);
+ // also init our xr_server from here
+ xr_server = memnew(XRServer);
register_core_singletons();
@@ -2276,9 +2284,9 @@ void Main::cleanup() {
EditorNode::unregister_editor_types();
#endif
- if (arvr_server) {
+ if (xr_server) {
// cleanup now before we pull the rug from underneath...
- memdelete(arvr_server);
+ memdelete(xr_server);
}
ImageLoader::cleanup();