Allowed negative amplify value for reverting axis direction

This commit is contained in:
Sascha Hlusiak
2007-03-22 14:01:01 -04:00
parent 35d8ee1bb0
commit 58abdbe99b
3 changed files with 4 additions and 2 deletions

View File

@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-joystick],
1.1.1,
1.2.0,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-joystick)

View File

@@ -81,6 +81,8 @@ Amplifies the influence of the axis. To make cursor movement slower, set to valu
.IR \<1.0 .
To make it faster, set to value
.IR \>1.0 .
To invert movement direction, set to a
.IR "negative value" .
Default: 1.0
.RE

View File

@@ -510,7 +510,7 @@ xf86JstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
}
if ((s=strstr(param, "amplify=")) != NULL ) {
if (sscanf(s, "amplify=%f", &fvalue) == 1) {
if ((fvalue > 10000)||(fvalue < 0.00001))
if ((fvalue > 10000)||(fvalue < -10000.0))
xf86Msg(X_WARNING,
"%s: amplifier of %.3f seems unreasonable. Ignored.\n",
local->name, fvalue);