mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2025-01-31 20:15:20 +01:00
launcher: Actually init the default service override options and make override_urlslash_value
more clear
This commit is contained in:
parent
29db89cebe
commit
7d129a3e63
@ -285,15 +285,16 @@ int main(int argc, const char **argv)
|
||||
ea3_ident_to_property(&ea3, ea3_config);
|
||||
|
||||
if (options.override_urlslash_enabled) {
|
||||
log_info("Overriding url_slash to: %d", options.override_urlslash);
|
||||
log_info(
|
||||
"Overriding url_slash to: %d", options.override_urlslash_value);
|
||||
|
||||
ea3_ident_replace_property_bool(
|
||||
ea3_config_root,
|
||||
"/network/url_slash",
|
||||
options.override_urlslash);
|
||||
options.override_urlslash_value);
|
||||
}
|
||||
|
||||
if (options.override_service_enabled) {
|
||||
if (options.override_service != NULL) {
|
||||
log_info("Overriding service url to: %s", options.override_service);
|
||||
|
||||
ea3_ident_replace_property_str(
|
||||
|
@ -25,6 +25,10 @@ void options_init(struct options *options)
|
||||
options->remote_debugger = false;
|
||||
array_init(&options->hook_dlls);
|
||||
array_init(&options->before_hook_dlls);
|
||||
|
||||
options->override_service = NULL;
|
||||
options->override_urlslash_enabled = false;
|
||||
options->override_urlslash_value = false;
|
||||
}
|
||||
|
||||
bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
||||
@ -141,7 +145,6 @@ bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
||||
return false;
|
||||
}
|
||||
|
||||
options->override_service_enabled = true;
|
||||
options->override_service = argv[++i];
|
||||
|
||||
break;
|
||||
@ -155,12 +158,12 @@ bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
||||
|
||||
const char * urlslash_value = argv[++i];
|
||||
|
||||
options->override_urlslash = false;
|
||||
options->override_urlslash_value = false;
|
||||
if (_stricmp(urlslash_value, "1") == 0) {
|
||||
options->override_urlslash = true;
|
||||
options->override_urlslash_value = true;
|
||||
}
|
||||
if (_stricmp(urlslash_value, "true") == 0) {
|
||||
options->override_urlslash = true;
|
||||
options->override_urlslash_value = true;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -19,10 +19,9 @@ struct options {
|
||||
struct array hook_dlls;
|
||||
struct array before_hook_dlls;
|
||||
bool remote_debugger;
|
||||
bool override_service_enabled;
|
||||
const char *override_service;
|
||||
bool override_urlslash_enabled;
|
||||
bool override_urlslash;
|
||||
bool override_urlslash_value;
|
||||
};
|
||||
|
||||
void options_init(struct options *options);
|
||||
|
Loading…
x
Reference in New Issue
Block a user