diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-11 23:37:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 23:37:10 +0200 |
commit | c30ab882d758fea6578aa6c31a79b3938fba222b (patch) | |
tree | 171f37cd245c14151d604f0635b65d9d40298f91 /main | |
parent | 20a32d6a2effd71a6093305622dbb4f4b82a2cf9 (diff) | |
parent | e9c606fd296052aed9eee2c79cf9c6dc6d337eaa (diff) |
Merge pull request #11539 from BastiaanOlij/remove_directory_scan
Removed directory scan from project load
Diffstat (limited to 'main')
-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 c6d3c3f15c..6fbd906679 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -162,6 +162,7 @@ void Main::print_help(const char *p_binary) { #endif OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n"); OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n"); + OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n"); OS::get_singleton()->print(" --main-pack <file> Path to a pack (.pck) file to load.\n"); OS::get_singleton()->print(" --render-thread <mode> Render thread mode ('unsafe', 'safe', 'separate').\n"); OS::get_singleton()->print(" --remote-fs <address> Remote filesystem (<host/IP>[:<port>] address).\n"); @@ -290,6 +291,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph String video_driver = ""; String audio_driver = ""; String game_path = "."; + bool upwards = false; String debug_mode; String debug_host; String main_pack; @@ -498,6 +500,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->print("Missing relative or absolute path, aborting.\n"); goto error; } + } else if (I->get() == "-u" || I->get() == "--upwards") { // scan folders upwards + upwards = true; } else if (I->get().ends_with("project.godot")) { String path; String file = I->get(); @@ -695,7 +699,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph #endif - if (globals->setup(game_path, main_pack) != OK) { + if (globals->setup(game_path, main_pack, upwards) != OK) { #ifdef TOOLS_ENABLED editor = false; |