mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Merge pull request #11606 from JosJuice/control-group-save-enabled
InputCommon: Fix ControlGroup::SaveConfig with DefaultValue::Disabled
This commit is contained in:
commit
251fb92b80
@ -57,7 +57,7 @@ void ControlGroup::LoadConfig(IniFile::Section* sec, const std::string& defdev,
|
|||||||
|
|
||||||
// enabled
|
// enabled
|
||||||
if (default_value != DefaultValue::AlwaysEnabled)
|
if (default_value != DefaultValue::AlwaysEnabled)
|
||||||
sec->Get(group + "Enabled", &enabled, default_value == DefaultValue::Enabled);
|
sec->Get(group + "Enabled", &enabled, default_value != DefaultValue::Disabled);
|
||||||
|
|
||||||
for (auto& setting : numeric_settings)
|
for (auto& setting : numeric_settings)
|
||||||
setting->LoadFromIni(*sec, group);
|
setting->LoadFromIni(*sec, group);
|
||||||
@ -109,7 +109,7 @@ void ControlGroup::SaveConfig(IniFile::Section* sec, const std::string& defdev,
|
|||||||
const std::string group(base + name + "/");
|
const std::string group(base + name + "/");
|
||||||
|
|
||||||
// enabled
|
// enabled
|
||||||
sec->Set(group + "Enabled", enabled, true);
|
sec->Set(group + "Enabled", enabled, default_value != DefaultValue::Disabled);
|
||||||
|
|
||||||
for (auto& setting : numeric_settings)
|
for (auto& setting : numeric_settings)
|
||||||
setting->SaveToIni(*sec, group);
|
setting->SaveToIni(*sec, group);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user