diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2020-02-24 16:59:23 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2020-02-25 17:19:48 -0600 |
| commit | ed24f32c5bf31bbb249f2748e38d6066bb7f72d1 (patch) | |
| tree | 9def0ff79f1c627098f9e440902631bfdd06b6ff /Source/Core/InputCommon/ControllerEmu/StickGate.cpp | |
| parent | bd43e084f4e911d5eeec2f237559f382cd89f795 (diff) | |
InputCommon: Specify ini value default when saving calibration "center".
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/StickGate.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/StickGate.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp index 30c9acdcbd..5e2acb3f5b 100644 --- a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp +++ b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp @@ -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, |
