diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-05-06 19:59:29 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-05-06 19:59:29 +0200 |
commit | 653334cc8d4f232034c6086bd7672bb9e04932b7 (patch) | |
tree | 3ccc82a0a98165067580a23059a563860f2e0ab3 | |
parent | 50f4f0f9aedc904acabab0f01d03cb3784d704a3 (diff) |
Allow `.res` and `.tres` extensions in the scene CLI positional argument
This closes #35709.
-rw-r--r-- | main/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 95449dd5cc..398934a6c0 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1558,7 +1558,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 |