Another fix for XInput backend

This commit is contained in:
Silent 2020-12-07 18:08:48 +01:00
parent 98d6b49987
commit a4124fdc1b
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}