Add XInput implementation of GetRightThumbstickAxis

This commit is contained in:
2025-05-25 23:14:19 -05:00
parent 6f993eab34
commit f05307d318

View File

@@ -130,6 +130,20 @@ Vector2 jstick::GetRightThumbstickAxis(float deadzone, int hwid)
return Vector2(state.Gamepad.sThumbRX, state.Gamepad.sThumbRY);
}
Vector2 jstick::GetRightThumbstickAxisNormalized(float deadzone, int hwid)
{
Vector2 axisL = jstick::GetLeftThumbstickAxis(deadzone, hwid);
return axisL.Normalized();
}
Vector2 jstick::GetLeftThumbstickAxisNormalized(float deadzone, int hwid)
{
Vector2 axisR = jstick::GetRightThumbstickAxis(deadzone, hwid);
return axisR.Normalized();
}
bool jstick::IsButtonDown(const XBoxButton& btn, int hwid)
{
XINPUT_STATE state;