mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 03:41:10 +08:00
modify config file writer not to print the property name as a comment if
there is nothing to say about it.
This commit is contained in:
parent
6445feb63d
commit
41481b3655
@ -673,9 +673,11 @@ bool Config::PrintConfig(char const * const configfilename) const {
|
||||
help.replace(pos, 1, prefix);
|
||||
}
|
||||
|
||||
std::vector<Value> values = p->GetValues();
|
||||
|
||||
if (help != "" || !values.empty()) {
|
||||
fprintf(outfile, "# %*s: %s", (int)maxwidth, p->propname.c_str(), help.c_str());
|
||||
|
||||
std::vector<Value> values = p->GetValues();
|
||||
if (!values.empty()) {
|
||||
fprintf(outfile, "%s%s:", prefix, MSG_Get("CONFIG_SUGGESTED_VALUES"));
|
||||
std::vector<Value>::iterator it = values.begin();
|
||||
@ -690,6 +692,7 @@ bool Config::PrintConfig(char const * const configfilename) const {
|
||||
}
|
||||
fprintf(outfile, "\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
upcase(temp);
|
||||
strcat(temp,"_CONFIGFILE_HELP");
|
||||
@ -706,7 +709,6 @@ bool Config::PrintConfig(char const * const configfilename) const {
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(outfile,"\n");
|
||||
(*tel)->PrintData(outfile);
|
||||
fprintf(outfile,"\n"); /* Always an empty line between sections */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user