The resolution table has been added to the kernel driver. Let use
it when we can.

Signed-off-by: Ping Cheng <[email protected]>
---
 src/wcmUSB.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index 1219530..2c2eb32 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -488,13 +488,12 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
        if (!is_touch)
                common->wcmMaxX = absinfo.maximum;
        else
-       {
                common->wcmMaxTouchX = absinfo.maximum;
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
+       if (absinfo.resolution > 0)
                common->wcmTouchResolX = absinfo.resolution * 1000;
 #endif
-       }
 
        /* max y */
        if (ioctl(pInfo->fd, EVIOCGABS(ABS_Y), &absinfo) < 0)
@@ -512,13 +511,12 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
        if (!is_touch)
                common->wcmMaxY = absinfo.maximum;
        else
-       {
                common->wcmMaxTouchY = absinfo.maximum;
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
+       if (absinfo.resolution > 0)
                common->wcmTouchResolY = absinfo.resolution * 1000;
 #endif
-       }
 
        /* max finger strip X for tablets with Expresskeys
         * or physical X for touch devices in hundredths of a mm */
-- 
1.7.4.2


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to