[MOUHID] Correctly detect tablet devices
authorHervé Poussineau <hpoussin@reactos.org>
Fri, 10 May 2019 06:39:10 +0000 (08:39 +0200)
committerHervé Poussineau <hpoussin@reactos.org>
Fri, 10 May 2019 09:35:01 +0000 (11:35 +0200)
Some mice give a logical min/logical max which is the maximum move
that they can provide. Those were wrongly detected as absolute mice,
and mouse pointer was mostly stuck at the upper left corner of the
screen.

drivers/hid/mouhid/mouhid.c

index 0450909..073b22c 100644 (file)
@@ -947,8 +947,8 @@ MouHid_StartDevice(
     }
 
     /* check if mice is absolute */
-    if (DeviceExtension->ValueCapsY.LogicalMax > DeviceExtension->ValueCapsY.LogicalMin ||
-        DeviceExtension->ValueCapsX.LogicalMax > DeviceExtension->ValueCapsX.LogicalMin)
+    if (DeviceExtension->ValueCapsY.IsAbsolute &&
+        DeviceExtension->ValueCapsX.IsAbsolute)
     {
         /* mice is absolute */
         DeviceExtension->MouseAbsolute = TRUE;