Run save after loading to fill in missing config entries

A fix for the growing complaints about config files not updating when new settings are added.
Thanks to the prior changes, default settings are new properly defined everywhere, so running save here will properly fill in missing values with their expected defaults instead of the weird settings load would sometimes use.
This commit is contained in:
Stephen Miller 2025-07-02 00:11:38 -05:00
parent c162ec2701
commit 018819caff

View file

@ -677,6 +677,9 @@ void load(const std::filesystem::path& path) {
const toml::value& keys = data.at("Keys");
trophyKey = toml::find_or<std::string>(keys, "TrophyKey", trophyKey);
}
// Run save after loading to generate any missing fields with default values.
save(path);
}
void sortTomlSections(toml::ordered_value& data) {