InputCommon: Fix unnecessary "Modifier/Range" ini file entries.

This commit is contained in:
Jordan Woyak 2024-04-15 18:32:31 -05:00
parent dbc7e03577
commit 47b06d274e
1 changed files with 8 additions and 0 deletions

View File

@ -275,6 +275,14 @@ void ReshapableInput::SaveConfig(Common::IniFile::Section* section,
ControlGroup::SaveConfig(section, default_device, base_name);
const std::string group(base_name + name + '/');
// Special handling for "Modifier" button "Range" settings which default to 50% instead of 100%.
if (const auto* modifier_input = GetModifierInput())
{
section->Set(group + modifier_input->name + "/Range", modifier_input->control_ref->range * 100,
50.0);
}
std::vector<std::string> save_data(m_calibration.size());
std::transform(
m_calibration.begin(), m_calibration.end(), save_data.begin(),