Input:DInput: Fix build after adding FullAxis support for SDL

This commit is contained in:
TellowKrinkle 2022-11-19 19:44:59 -06:00 committed by refractionpcsx2
parent a72cecd235
commit 3d8fe01bc6
1 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ std::optional<InputBindingKey> DInputSource::ParseKeyString(const std::string_vi
key.source_subtype = InputSubclass::ControllerAxis; key.source_subtype = InputSubclass::ControllerAxis;
key.data = axis_index.value(); key.data = axis_index.value();
key.negative = (binding[0] == '-'); key.modifier = (binding[0] == '-') ? InputModifier::Negate : InputModifier::None;
return key; return key;
} }
else if (StringUtil::StartsWith(binding, "Hat")) else if (StringUtil::StartsWith(binding, "Hat"))
@ -391,7 +391,7 @@ std::string DInputSource::ConvertKeyToString(InputBindingKey key)
{ {
if (key.source_subtype == InputSubclass::ControllerAxis) if (key.source_subtype == InputSubclass::ControllerAxis)
{ {
ret = fmt::format("DInput-{}/{}Axis{}", u32(key.source_index), key.negative ? '-' : '+', u32(key.data)); ret = fmt::format("DInput-{}/{}Axis{}", u32(key.source_index), key.modifier == InputModifier::Negate ? '-' : '+', u32(key.data));
} }
else if (key.source_subtype == InputSubclass::ControllerButton && key.data >= MAX_NUM_BUTTONS) else if (key.source_subtype == InputSubclass::ControllerButton && key.data >= MAX_NUM_BUTTONS)
{ {