# HG changeset patch # User Sam Lantinga # Date 991925827 0 # Node ID 6f3c474f9abda6260a7f35a5b8bea316706f6148 # Parent f97decee03a9348b9a4d5154fdb79a0467e4c1a2 Fixed bug in joystick motion, thanks to Alexandre Duret-Lutz diff -r f97decee03a9 -r 6f3c474f9abd src/joystick/win32/SDL_mmjoystick.c --- a/src/joystick/win32/SDL_mmjoystick.c Thu Jun 07 14:53:18 2001 +0000 +++ b/src/joystick/win32/SDL_mmjoystick.c Thu Jun 07 14:57:07 2001 +0000 @@ -235,7 +235,7 @@ 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);