Assume a finger of regular width when no width value is reported by

the touchpad (which happens when it has no extended capabilities).

Spotted by:	dhw
Forgotten by:	philip
This commit is contained in:
Philip Paeps 2004-08-08 01:26:00 +00:00
parent e314368afd
commit c4dbfe3893
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133301
2 changed files with 20 additions and 6 deletions

View file

@ -2508,9 +2508,16 @@ psmsoftintr(void *arg)
/* Pressure value. */
z = pb->ipacket[2];
w = ((pb->ipacket[0] & 0x30) >> 2) |
((pb->ipacket[0] & 0x04) >> 1) |
((pb->ipacket[3] & 0x04) >> 2);
/* Finger width value */
if (sc->synhw.capExtended) {
w = ((pb->ipacket[0] & 0x30) >> 2) |
((pb->ipacket[0] & 0x04) >> 1) |
((pb->ipacket[3] & 0x04) >> 2);
} else {
/* Assume a finger of regular width */
w = 4;
}
/* Button presses */
ms.button = 0;

View file

@ -2508,9 +2508,16 @@ psmsoftintr(void *arg)
/* Pressure value. */
z = pb->ipacket[2];
w = ((pb->ipacket[0] & 0x30) >> 2) |
((pb->ipacket[0] & 0x04) >> 1) |
((pb->ipacket[3] & 0x04) >> 2);
/* Finger width value */
if (sc->synhw.capExtended) {
w = ((pb->ipacket[0] & 0x30) >> 2) |
((pb->ipacket[0] & 0x04) >> 1) |
((pb->ipacket[3] & 0x04) >> 2);
} else {
/* Assume a finger of regular width */
w = 4;
}
/* Button presses */
ms.button = 0;