mirror of https://github.com/OpenTTD/OpenTTD
Merge cf9c6fcc57
into bd2430dc94
commit
bfc6ae194d
|
@ -625,6 +625,7 @@ int openttd_main(std::span<std::string_view> arguments)
|
|||
InitializeLanguagePacks(); // A language pack is needed for GetString()
|
||||
fmt::print(stderr, "{}\n", GetString(_load_check_data.error, _load_check_data.error_msg));
|
||||
}
|
||||
ret = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -646,14 +647,12 @@ int openttd_main(std::span<std::string_view> arguments)
|
|||
case 'c': _config_file = mgo.opt; break;
|
||||
case 'x': scanner->save_config = false; break;
|
||||
case 'X': only_local_path = true; break;
|
||||
case 'h':
|
||||
i = -2; // Force printing of help.
|
||||
break;
|
||||
case 'h': break; // handled below
|
||||
}
|
||||
if (i == -2) break;
|
||||
if (i == 'h' || i == -2) break;
|
||||
}
|
||||
|
||||
if (i == -2 || !mgo.arguments.empty()) {
|
||||
if (i == 'h' || i == -2 || !mgo.arguments.empty()) {
|
||||
/* Either the user typed '-h', they made an error, or they added unrecognized command line arguments.
|
||||
* In all cases, print the help, and exit.
|
||||
*
|
||||
|
@ -665,6 +664,7 @@ int openttd_main(std::span<std::string_view> arguments)
|
|||
BaseSounds::FindSets();
|
||||
BaseMusic::FindSets();
|
||||
ShowHelp();
|
||||
if (i != 'h') ret = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue