mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
input: replace -1 as default axis limit with NO_AXIS_LIMIT define.
This allows easier refacturing of the coordinate limit handling. Grepping for -1 is boring.
This commit is contained in:
parent
00acb40f2b
commit
ffaccc2dc9
4 changed files with 30 additions and 17 deletions
|
|
@ -1153,13 +1153,22 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise the device's valuators. The memory must already be allocated,
|
||||
* this function merely inits the matching axis (specified through axnum) to
|
||||
* sane values.
|
||||
*
|
||||
* It is a condition that (minval < maxval).
|
||||
*
|
||||
* @see InitValuatorClassDeviceStruct
|
||||
*/
|
||||
_X_EXPORT void
|
||||
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval,
|
||||
int resolution, int min_res, int max_res)
|
||||
{
|
||||
AxisInfoPtr ax;
|
||||
|
||||
if (!dev || !dev->valuator)
|
||||
|
||||
if (!dev || !dev->valuator || minval > maxval)
|
||||
return;
|
||||
|
||||
ax = dev->valuator->axes + axnum;
|
||||
|
|
|
|||
Loading…
Reference in a new issue