mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 22:35:39 +00:00
Merge pull request #1166 from CookiePLMonster/xinput-button-fix
XInput: Fix mapping buttons to axes
This commit is contained in:
commit
8e79059fe3
|
@ -289,11 +289,10 @@ bool XInputControllerInterface::HandleButtonEvent(u32 index, u32 button, bool pr
|
|||
return true;
|
||||
}
|
||||
|
||||
// Assume a half-axis, i.e. in 0..1 range
|
||||
const AxisCallback& axis_cb = m_controllers[index].button_axis_mapping[button];
|
||||
if (axis_cb)
|
||||
{
|
||||
axis_cb(pressed ? 1.0f : 0.0f);
|
||||
axis_cb(pressed ? 1.0f : -1.0f);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue