mirror of
https://github.com/X11Libre/xf86-input-joystick.git
synced 2026-04-14 11:54:23 +00:00
Allowed negative amplify value for reverting axis direction
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user