From a78564119648427770de0ce41e98e71cbc3af19a Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 6 May 2020 19:59:29 +0200 Subject: [PATCH] Allow `.res` and `.tres` extensions in the scene CLI positional argument This closes #35709. (cherry picked from commit 653334cc8d4f232034c6086bd7672bb9e04932b7) --- main/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/main.cpp b/main/main.cpp index 362a7c7c9e1..28113c00b15 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1455,7 +1455,11 @@ bool Main::start() { } else if (args[i].length() && args[i][0] != '-' && positional_arg == "") { positional_arg = args[i]; - if (args[i].ends_with(".scn") || args[i].ends_with(".tscn") || args[i].ends_with(".escn")) { + if (args[i].ends_with(".scn") || + args[i].ends_with(".tscn") || + args[i].ends_with(".escn") || + args[i].ends_with(".res") || + args[i].ends_with(".tres")) { // Only consider the positional argument to be a scene path if it ends with // a file extension associated with Godot scenes. This makes it possible // for projects to parse command-line arguments for custom CLI arguments