Commit e82590fa authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug in joystick motion, thanks to Alexandre Duret-Lutz

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4050
parent 4c41ee7d
......@@ -235,7 +235,7 @@ void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick)
transaxis = joystick->hwdata->transaxis;
for (i = 0; i < joystick->naxes; i++) {
if (joyinfo.dwFlags & flags[i]) {
value = (int)((float)(pos[i] + transaxis[i].offset) * transaxis[i].scale);
value = (int)(((float)pos[i] + transaxis[i].offset) * transaxis[i].scale);
change = (value - joystick->axes[i]);
if ( (change < -JOY_AXIS_THRESHOLD) || (change > JOY_AXIS_THRESHOLD) ) {
SDL_PrivateJoystickAxis(joystick, (Uint8)i, (Sint16)value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment