Add XInput implementation of GetRightThumbstickAxis
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user