diff src/joystick/linux/SDL_sysjoystick.c @ 5085:f521f8739611 SDL-1.2

Missed a small part of the patch
author Sam Lantinga <slouken@libsdl.org>
date Mon, 24 Jan 2011 14:34:58 -0800
parents 4c3c2599559b
children
line wrap: on
line diff
--- a/src/joystick/linux/SDL_sysjoystick.c	Mon Jan 24 14:31:32 2011 -0800
+++ b/src/joystick/linux/SDL_sysjoystick.c	Mon Jan 24 14:34:58 2011 -0800
@@ -716,10 +716,10 @@
 				} else {
 				    joystick->hwdata->abs_correct[i].used = 1;
 				    joystick->hwdata->abs_correct[i].coef[0] =
-					(absinfo.maximum + absinfo.minimum) / 2 - values[4];
+					(absinfo.maximum + absinfo.minimum) / 2 - absinfo.flat;
 				    joystick->hwdata->abs_correct[i].coef[1] =
-					(absinfo.maximum + absinfo.minimum) / 2 + values[4];
-				    t = ((absinfo.maximum - absinfo.minimum) / 2 - 2 * values[4]);
+					(absinfo.maximum + absinfo.minimum) / 2 + absinfo.flat;
+				    t = ((absinfo.maximum - absinfo.minimum) / 2 - 2 * absinfo.flat);
 				    if ( t != 0 ) {
 					joystick->hwdata->abs_correct[i].coef[2] = (1 << 29) / t;
 				    } else {