Invert the Y axis values, not just negate them, as negating them leads them to leave their min:max range

This commit is contained in:
Ingo Ruhnke 2011-01-27 05:04:02 +01:00
parent 445fa1aa97
commit e6720ec3f0

View file

@ -115,10 +115,10 @@ UInputConfig::send(Xbox360Msg& msg)
// analog sticks
send_axis(XBOX_AXIS_X1, msg.x1);
send_axis(XBOX_AXIS_Y1, -msg.y1);
send_axis(XBOX_AXIS_Y1, ~msg.y1);
send_axis(XBOX_AXIS_X2, msg.x2);
send_axis(XBOX_AXIS_Y2, -msg.y2);
send_axis(XBOX_AXIS_Y2, ~msg.y2);
// dpad
if (msg.dpad_up) send_axis(XBOX_AXIS_DPAD_Y, -1);
@ -167,10 +167,10 @@ UInputConfig::send(XboxMsg& msg)
// analog sticks
send_axis(XBOX_AXIS_X1, msg.x1);
send_axis(XBOX_AXIS_Y1, -msg.y1);
send_axis(XBOX_AXIS_Y1, ~msg.y1);
send_axis(XBOX_AXIS_X2, msg.x2);
send_axis(XBOX_AXIS_Y2, -msg.y2);
send_axis(XBOX_AXIS_Y2, ~msg.y2);
// dpad as axis
if (msg.dpad_up) send_axis(XBOX_AXIS_DPAD_Y, -1);