Overhaul CLI argument forwarding to processes started by the editor
This commit is contained in:
parent
f2a6168414
commit
e886d662ec
8 changed files with 58 additions and 38 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/config/project_settings.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "main/main.h"
|
||||
#include "servers/display_server.h"
|
||||
|
||||
EditorRun::Status EditorRun::get_status() const {
|
||||
|
|
@ -46,6 +47,10 @@ String EditorRun::get_running_scene() const {
|
|||
Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
|
||||
List<String> args;
|
||||
|
||||
for (const String &a : Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_PROJECT)) {
|
||||
args.push_back(a);
|
||||
}
|
||||
|
||||
String resource_path = ProjectSettings::get_singleton()->get_resource_path();
|
||||
if (!resource_path.is_empty()) {
|
||||
args.push_back("--path");
|
||||
|
|
@ -105,10 +110,6 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
|
|||
screen -= 3;
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->is_disable_crash_handler()) {
|
||||
args.push_back("--disable-crash-handler");
|
||||
}
|
||||
|
||||
Rect2 screen_rect;
|
||||
screen_rect.position = DisplayServer::get_singleton()->screen_get_position(screen);
|
||||
screen_rect.size = DisplayServer::get_singleton()->screen_get_size(screen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue