changeset 49:6f3c474f9abd

Fixed bug in joystick motion, thanks to Alexandre Duret-Lutz
author Sam Lantinga <slouken@lokigames.com>
date Thu, 07 Jun 2001 14:57:07 +0000
parents f97decee03a9
children eda2f15ffb70
files src/joystick/win32/SDL_mmjoystick.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);