dix: continue to check for invalid valuator ranges.
In an ideal world, the drivers would init all axes with NO_AXIS_LIMIT. In the real world, this is an ABI break, so let's just leave the old check in.
This commit is contained in:
parent
a0e6a7d4f5
commit
8e56fd9728
|
@ -358,7 +358,14 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val)
|
|||
{
|
||||
AxisInfoPtr axis = pDev->valuator->axes + axisNum;
|
||||
|
||||
/* InitValuatoraAxisStruct ensures that (min < max) */
|
||||
/* InitValuatoraAxisStruct ensures that (min < max). */
|
||||
|
||||
|
||||
/* FIXME: drivers need to be updated, evdev e.g. inits axes as min = 0 and
|
||||
* max = -1. Leave this extra check until the drivers have been updated.
|
||||
*/
|
||||
if (axis->max_value < axis->min_value)
|
||||
return;
|
||||
|
||||
if (axis->min_value != NO_AXIS_LIMITS &&
|
||||
*val < axis->min_value)
|
||||
|
|
Loading…
Reference in New Issue
Block a user