mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Overhaul CLI argument forwarding to processes started by the editor
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
|
||||
#include "editor_run.h"
|
||||
|
||||
#include "plugins/script_editor_plugin.h"
|
||||
#include "script_editor_debugger.h"
|
||||
|
||||
#include "core/project_settings.h"
|
||||
#include "editor_settings.h"
|
||||
#include "main/main.h"
|
||||
#include "plugins/script_editor_plugin.h"
|
||||
#include "script_editor_debugger.h"
|
||||
|
||||
EditorRun::Status EditorRun::get_status() const {
|
||||
return status;
|
||||
@@ -47,6 +47,11 @@ String EditorRun::get_running_scene() const {
|
||||
Error EditorRun::run(const String &p_scene, const String &p_custom_args, const List<String> &p_breakpoints, const bool &p_skip_breakpoints) {
|
||||
List<String> args;
|
||||
|
||||
const Vector<String> &forwardable_args = Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_PROJECT);
|
||||
for (int i = 0; i < forwardable_args.size(); i++) {
|
||||
args.push_back(forwardable_args[i]);
|
||||
}
|
||||
|
||||
String resource_path = ProjectSettings::get_singleton()->get_resource_path();
|
||||
|
||||
if (resource_path != "") {
|
||||
@@ -101,10 +106,6 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
|
||||
screen -= 3;
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->is_disable_crash_handler()) {
|
||||
args.push_back("--disable-crash-handler");
|
||||
}
|
||||
|
||||
Rect2 screen_rect;
|
||||
screen_rect.position = OS::get_singleton()->get_screen_position(screen);
|
||||
screen_rect.size = OS::get_singleton()->get_screen_size(screen);
|
||||
|
||||
Reference in New Issue
Block a user