From d06ce5420c792526c43cab7d6a3db1ba2fdcb821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Thu, 13 Nov 2025 10:34:37 +0200 Subject: [PATCH] Fix scene argument parsing. --- main/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 1ec96a577bc..0c8c844038e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -3919,7 +3919,6 @@ int Main::start() { return EXIT_FAILURE; #endif // defined(OVERRIDE_PATH_ENABLED) } 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(); String scene_path = ResourceUID::ensure_path(E->get()); @@ -3934,14 +3933,15 @@ int Main::start() { // or other file extensions without trouble. This can be used to implement // "drag-and-drop onto executable" logic, which can prove helpful // for non-game applications. +#if defined(OVERRIDE_PATH_ENABLED) game_path = scene_path; - } #else - ERR_PRINT( - "Scene path was specified on the command line, but this Godot binary was compiled without support for path overrides. Aborting.\n" - "To be able to use it, use the `disable_path_overrides=no` SCons option when compiling Godot.\n"); - return EXIT_FAILURE; + ERR_PRINT( + "Scene path was specified on the command line, but this Godot binary was compiled without support for path overrides. Aborting.\n" + "To be able to use it, use the `disable_path_overrides=no` SCons option when compiling Godot.\n"); + return EXIT_FAILURE; #endif // defined(OVERRIDE_PATH_ENABLED) + } } // Then parameters that have an argument to the right. else if (E->next()) {