Commit 67f56bb0 authored by Daniel Drake's avatar Daniel Drake Committed by Dmitry Torokhov

Input: hgpk - detect simple mode overflows

Based on work by Paul Fox.
Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 87abb6bb
...@@ -431,6 +431,11 @@ static void hgpk_process_simple_packet(struct psmouse *psmouse) ...@@ -431,6 +431,11 @@ static void hgpk_process_simple_packet(struct psmouse *psmouse)
int x = packet[1] - ((packet[0] << 4) & 0x100); int x = packet[1] - ((packet[0] << 4) & 0x100);
int y = ((packet[0] << 3) & 0x100) - packet[2]; int y = ((packet[0] << 3) & 0x100) - packet[2];
if (packet[0] & 0xc0)
hgpk_dbg(psmouse,
"overflow -- 0x%02x 0x%02x 0x%02x\n",
packet[0], packet[1], packet[2]);
if (hgpk_discard_decay_hack(psmouse, x, y)) { if (hgpk_discard_decay_hack(psmouse, x, y)) {
if (tpdebug) if (tpdebug)
hgpk_dbg(psmouse, "discarding\n"); hgpk_dbg(psmouse, "discarding\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment