If the axis range is invalid, don't try to scale into the axis range. This supresses and error message emitted by xf86ScaleAxis().
Signed-off-by: Peter Hutterer <[email protected]> --- This is just a quickfix to stop the logspam currently observed when using the touch ring. long fix in the making src/wcmCommon.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index ff4e423..22a76dd 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -505,11 +505,14 @@ void wcmRotateAndScaleCoordinates(InputInfoPtr pInfo, int* x, int* y) axis_x = &dev->valuator->axes[0]; axis_y = &dev->valuator->axes[1]; - *x = xf86ScaleAxis(*x, axis_x->max_value, axis_x->min_value, - priv->bottomX, priv->topX); - - *y = xf86ScaleAxis(*y, axis_y->max_value, axis_y->min_value, - priv->bottomY, priv->topY); + /* Don't try to scale relative axes */ + if (axis_x->max_value > axis_x->min_value) + *x = xf86ScaleAxis(*x, axis_x->max_value, axis_x->min_value, + priv->bottomX, priv->topX); + + if (axis_y->max_value > axis_y->min_value) + *y = xf86ScaleAxis(*y, axis_y->max_value, axis_y->min_value, + priv->bottomY, priv->topY); /* coordinates are now in the axis rage we advertise for the device */ -- 1.7.3.3 ------------------------------------------------------------------------------ _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
