mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-12 20:55:56 +00:00
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:
parent
c162ec2701
commit
018819caff
1 changed files with 3 additions and 0 deletions
|
@ -677,6 +677,9 @@ void load(const std::filesystem::path& path) {
|
||||||
const toml::value& keys = data.at("Keys");
|
const toml::value& keys = data.at("Keys");
|
||||||
trophyKey = toml::find_or<std::string>(keys, "TrophyKey", trophyKey);
|
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) {
|
void sortTomlSections(toml::ordered_value& data) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue