ENGINES: Register all the extra gui options default values on game start

Fixes #11398. This regressed due to the recent configuration dialog
changes.
This commit is contained in:
Bastien Bouclet 2020-03-29 19:58:35 +02:00
parent f6de4e82d4
commit 2e20971bab

View file

@ -338,8 +338,12 @@ SaveStateList MetaEngine::listSaves(const char *target, bool saveMode) const {
return saveList;
}
void MetaEngine::registerDefaultSettings(const Common::String &target) const {
const ExtraGuiOptions engineOptions = getExtraGuiOptions(target);
void MetaEngine::registerDefaultSettings(const Common::String &) const {
// Note that as we don't pass the target to getExtraGuiOptions
// we get all the options, even those not relevant for the current
// game. This is necessary because some engines unconditionally
// access the configuration.
const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
for (uint i = 0; i < engineOptions.size(); i++) {
ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
}