Option: enable --show-errors if --stat is set

This commit is contained in:
李通洲
2022-12-14 13:52:16 +08:00
parent b09aa3240a
commit 54912df237
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -34,7 +34,8 @@
#--multithreading true
# Print stat option:
# Sets if fastfetch should print time usage (in ms) for individual modules.
# Sets if fastfetch should print time usage (in ms) for individual modules
# If true, it will also enable --show-errors
# Must be true or false.
# Default is false.
#--stat true
+4 -1
View File
@@ -910,7 +910,10 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
else if(strcasecmp(key, "--thread") == 0 || strcasecmp(key, "--multithreading") == 0)
instance->config.multithreading = optionParseBoolean(value);
else if(strcasecmp(key, "--stat") == 0)
instance->config.stat = optionParseBoolean(value);
{
if((instance->config.stat = optionParseBoolean(value)))
instance->config.showErrors = true;
}
else if(strcasecmp(key, "--allow-slow-operations") == 0)
instance->config.allowSlowOperations = optionParseBoolean(value);
else if(strcasecmp(key, "--unbuffered") == 0)