Change reused variable name in command line parsing
This commit is contained in:
parent
5b4974f171
commit
430d84769c
|
@ -337,7 +337,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
|
|
||||||
String video_driver = "";
|
String video_driver = "";
|
||||||
String audio_driver = "";
|
String audio_driver = "";
|
||||||
String game_path = ".";
|
String project_path = ".";
|
||||||
bool upwards = false;
|
bool upwards = false;
|
||||||
String debug_mode;
|
String debug_mode;
|
||||||
String debug_host;
|
String debug_host;
|
||||||
|
@ -553,7 +553,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
if (OS::get_singleton()->set_cwd(p) == OK) {
|
if (OS::get_singleton()->set_cwd(p) == OK) {
|
||||||
//nothing
|
//nothing
|
||||||
} else {
|
} else {
|
||||||
game_path = I->next()->get(); //use game_path instead
|
project_path = I->next()->get(); //use project_path instead
|
||||||
}
|
}
|
||||||
N = I->next()->next();
|
N = I->next()->next();
|
||||||
} else {
|
} else {
|
||||||
|
@ -576,7 +576,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
if (OS::get_singleton()->set_cwd(path) == OK) {
|
if (OS::get_singleton()->set_cwd(path) == OK) {
|
||||||
// path already specified, don't override
|
// path already specified, don't override
|
||||||
} else {
|
} else {
|
||||||
game_path = path;
|
project_path = path;
|
||||||
}
|
}
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
editor = true;
|
editor = true;
|
||||||
|
@ -678,14 +678,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
I = N;
|
I = N;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (globals->setup(game_path, main_pack, upwards) == OK) {
|
if (globals->setup(project_path, main_pack, upwards) == OK) {
|
||||||
found_project = true;
|
found_project = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
editor = false;
|
editor = false;
|
||||||
#else
|
#else
|
||||||
OS::get_singleton()->print("Error: Could not load game path '%s'.\n", game_path.ascii().get_data());
|
OS::get_singleton()->print("Error: Could not load game path '%s'.\n", project_path.ascii().get_data());
|
||||||
|
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
|
@ -976,7 +976,7 @@ error:
|
||||||
|
|
||||||
video_driver = "";
|
video_driver = "";
|
||||||
audio_driver = "";
|
audio_driver = "";
|
||||||
game_path = "";
|
project_path = "";
|
||||||
|
|
||||||
args.clear();
|
args.clear();
|
||||||
main_args.clear();
|
main_args.clear();
|
||||||
|
|
Loading…
Reference in New Issue