1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Check only original default settings

When more than 1 user config layers are used we still want to check only the
first layer of default settings loaded from settings-default.cfg.
This commit is contained in:
elsid 2023-04-10 15:37:46 +02:00
parent ad25e9b154
commit bdc2eb5250
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -130,6 +130,8 @@ namespace Settings
+ "\" was properly installed.");
parser.loadSettingsFile(defaultsBin, mDefaultSettings, true, false);
const CategorySettingValueMap originalDefaultSettings = mDefaultSettings;
// Load "settings.cfg" or "openmw-cs.cfg" from every config dir except the last one as additional default
// settings.
for (int i = 0; i < static_cast<int>(paths.size()) - 1; ++i)
@ -147,7 +149,7 @@ namespace Settings
Settings::Values::init();
for (const auto& [key, value] : mDefaultSettings)
for (const auto& [key, value] : originalDefaultSettings)
if (!sInitialized.contains(key))
throw std::runtime_error("Default setting [" + key.first + "] " + key.second + " is not initialized");