Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sys/dev/atkbdc/psm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4666,6 +4666,13 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms,
mask = sc->elanaction.mask;
nfingers = bitcount(mask);

/* The motion packet can only update two fingers at a time.
* Copy the previous state to get all active fingers. */
for (id = 0; id < ELANTECH_MAX_FINGERS; id++)
if (sc->elanaction.mask & (1 << id))
f[id] = sc->elanaction.fingers[id];

/* Update finger positions from the new packet */
scale = (pb->ipacket[0] & 0x10) ? 5 : 1;
for (i = 0; i <= 3; i += 3) {
id = ((pb->ipacket[i] & 0xe0) >> 5) - 1;
Expand Down