Missed a small part of the patch SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Mon, 24 Jan 2011 14:34:58 -0800
branchSDL-1.2
changeset 5083 f521f8739611
parent 5082 4c3c2599559b
child 5101 3500563bb2f8
Missed a small part of the patch
src/joystick/linux/SDL_sysjoystick.c
--- 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 {