allow loading client args from config

This commit is contained in:
2023-09-14 10:32:03 +02:00
parent a1004405ca
commit d47ebbcb28
3 changed files with 8 additions and 4 deletions

View File

@@ -344,12 +344,13 @@ fn main() {
arg_remove(&mut args, "-f");
}
let client_args: String;
if let Some(pass) = arg_value(&args, "--pass") {
client_args = pass;
cfg.args = pass;
arg_remove_value(&mut args, "--pass");
} else {
client_args = String::new();
if cfg.args.is_empty() {
cfg.args = String::from("");
}
}
let games_json = http::get_body_string(format!("{}/games.json", MASTER).as_str());
@@ -413,7 +414,7 @@ fn main() {
cfg.force_update,
);
if !cfg.update_only {
launch(&install_path.join(format!("{}.exe", c)), &client_args);
launch(&install_path.join(format!("{}.exe", c)), &cfg.args);
}
return;
}