1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

Merge pull request #112716 from bruvzg/scene_arg

Fix scene argument parsing.
This commit is contained in:
Thaddeus Crews
2025-11-13 12:33:34 -06:00

View File

@@ -3920,7 +3920,6 @@ int Main::start() {
return EXIT_FAILURE; return EXIT_FAILURE;
#endif // defined(OVERRIDE_PATH_ENABLED) #endif // defined(OVERRIDE_PATH_ENABLED)
} else if (E->get().length() && E->get()[0] != '-' && positional_arg.is_empty() && game_path.is_empty()) { } else if (E->get().length() && E->get()[0] != '-' && positional_arg.is_empty() && game_path.is_empty()) {
#if defined(OVERRIDE_PATH_ENABLED)
positional_arg = E->get(); positional_arg = E->get();
String scene_path = ResourceUID::ensure_path(E->get()); String scene_path = ResourceUID::ensure_path(E->get());
@@ -3935,8 +3934,8 @@ int Main::start() {
// or other file extensions without trouble. This can be used to implement // or other file extensions without trouble. This can be used to implement
// "drag-and-drop onto executable" logic, which can prove helpful // "drag-and-drop onto executable" logic, which can prove helpful
// for non-game applications. // for non-game applications.
#if defined(OVERRIDE_PATH_ENABLED)
game_path = scene_path; game_path = scene_path;
}
#else #else
ERR_PRINT( ERR_PRINT(
"Scene path was specified on the command line, but this Godot binary was compiled without support for path overrides. Aborting.\n" "Scene path was specified on the command line, but this Godot binary was compiled without support for path overrides. Aborting.\n"
@@ -3944,6 +3943,7 @@ int Main::start() {
return EXIT_FAILURE; return EXIT_FAILURE;
#endif // defined(OVERRIDE_PATH_ENABLED) #endif // defined(OVERRIDE_PATH_ENABLED)
} }
}
// Then parameters that have an argument to the right. // Then parameters that have an argument to the right.
else if (E->next()) { else if (E->next()) {
bool parsed_pair = true; bool parsed_pair = true;