Don't treat axis as a boolean variable, treat it as a number of 0 or 1 and
error out if it is neither.
Also - typo fix, "axes" is plural.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/xf86Wacom.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index e52e8e3..50d7e14 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -326,7 +326,7 @@ void wcmVirtualTabletSize(LocalDevicePtr local)
  * wcmInitialCoordinates
  ****************************************************************************/
 
-void wcmInitialCoordinates(LocalDevicePtr local, int axes)
+void wcmInitialCoordinates(LocalDevicePtr local, int axis)
 {
        WacomDevicePtr priv = (WacomDevicePtr)local->private;
        WacomCommonPtr common = priv->common;
@@ -339,7 +339,7 @@ void wcmInitialCoordinates(LocalDevicePtr local, int axes)
        wcmMappingFactor(local);
 
        /* x ax */
-       if ( !axes )
+       if (axis == 0)
        {
                if (priv->flags & ABSOLUTE_FLAG)
                {
@@ -373,7 +373,7 @@ void wcmInitialCoordinates(LocalDevicePtr local, int axes)
                         topx, bottomx,
                        resolution, 0, resolution);
        }
-       else /* y ax */
+       else if (axis == 1) /* y ax */
        {
                if (priv->flags & ABSOLUTE_FLAG)
                {
@@ -406,7 +406,9 @@ void wcmInitialCoordinates(LocalDevicePtr local, int axes)
 #endif
                         topy, bottomy,
                        resolution, 0, resolution);
-       }
+       } else
+               xf86Msg(X_ERROR, "%s: Cannot initialize axis %d.\n", axis);
+
        return;
 }
 
-- 
1.6.6.1


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to