input: allow for max < min for relative axes on InitValuatorAxisStruct

Relative axes are initialized with 0, -1 but so far this never had any
effect as all users of this function (for relative axes) just set it to the
defaults anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Peter Hutterer 2011-09-23 12:04:39 +10:00
parent 8d1a414cca
commit 635a1f50bc

View File

@ -1073,7 +1073,7 @@ InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int
{
AxisInfoPtr ax;
if (!dev || !dev->valuator || minval > maxval)
if (!dev || !dev->valuator || (minval > maxval && mode == Absolute))
return FALSE;
if (axnum >= dev->valuator->numAxes)
return FALSE;