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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4050
This commit is contained in:
Sam Lantinga 2001-06-07 14:57:07 +00:00
parent 4c41ee7dc2
commit e82590fade

View File

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