summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-11-01 11:12:52 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-11-01 11:48:23 +0200
commit0b6b8427c81f60f6298491100ceaed3247649539 (patch)
treeb3323b8d0551a90f1175956a9d566cd02840d875 /main
parentefbbd14af3f3325c4201518528e7acb93d60098a (diff)
[macOS] Add `create_instance` function to spawn editor copies.
[macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index fe0f2693e4..676fa7b836 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2848,9 +2848,8 @@ void Main::cleanup(bool p_force) {
if (OS::get_singleton()->is_restart_on_exit_set()) {
//attempt to restart with arguments
- String exec = OS::get_singleton()->get_executable_path();
List<String> args = OS::get_singleton()->get_restart_on_exit_arguments();
- OS::get_singleton()->create_process(exec, args);
+ OS::get_singleton()->create_instance(args);
OS::get_singleton()->set_restart_on_exit(false, List<String>()); //clear list (uses memory)
}