From 018819caff42fc9286cb6285545b7e1601f696ce Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Wed, 2 Jul 2025 00:11:38 -0500 Subject: [PATCH] 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. --- src/common/config.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/config.cpp b/src/common/config.cpp index c1c5e4ea4..3c8188734 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -677,6 +677,9 @@ void load(const std::filesystem::path& path) { const toml::value& keys = data.at("Keys"); trophyKey = toml::find_or(keys, "TrophyKey", trophyKey); } + + // Run save after loading to generate any missing fields with default values. + save(path); } void sortTomlSections(toml::ordered_value& data) {