InputCommon: Specify ini value default when saving calibration "center".

This commit is contained in:
Jordan Woyak 2020-02-24 16:59:23 -06:00
parent bd43e084f4
commit ed24f32c5b
1 changed files with 4 additions and 3 deletions

View File

@ -282,10 +282,11 @@ void ReshapableInput::SaveConfig(IniFile::Section* section, const std::string& d
[](ControlState val) { return fmt::format("{:.2f}", val * CALIBRATION_CONFIG_SCALE); });
section->Set(group + CALIBRATION_CONFIG_NAME, JoinStrings(save_data, " "), "");
const auto center_data = fmt::format("{:.2f} {:.2f}", m_center.x * CENTER_CONFIG_SCALE,
// Save center value.
static constexpr char center_format[] = "{:.2f} {:.2f}";
const auto center_data = fmt::format(center_format, m_center.x * CENTER_CONFIG_SCALE,
m_center.y * CENTER_CONFIG_SCALE);
section->Set(group + CENTER_CONFIG_NAME, center_data, "");
section->Set(group + CENTER_CONFIG_NAME, center_data, fmt::format(center_format, 0.0, 0.0));
}
ReshapableInput::ReshapeData ReshapableInput::Reshape(ControlState x, ControlState y,