mirror of https://github.com/PCSX2/pcsx2.git
Input:DInput: Fix build after adding FullAxis support for SDL
This commit is contained in:
parent
a72cecd235
commit
3d8fe01bc6
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue