diff options
author | yokota <yokota@FreeBSD.org> | 1999-06-03 12:42:10 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-06-03 12:42:10 +0000 |
commit | 53f4c06394f49c442237b9555232d7fddd5340a4 (patch) | |
tree | e2508dec2f05be844979ac2469491a11b685d749 /usr.sbin/moused | |
parent | c8eab8c8632d748b5b4881dfb914a801eeebce5a (diff) | |
download | FreeBSD-src-53f4c06394f49c442237b9555232d7fddd5340a4.zip FreeBSD-src-53f4c06394f49c442237b9555232d7fddd5340a4.tar.gz |
Fix PS/2 MouseMan+ protocol. We have been looking at a wrong place
for the sign bit for roller movement!
Diffstat (limited to 'usr.sbin/moused')
-rw-r--r-- | usr.sbin/moused/moused.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c index ecb9053..91d224f 100644 --- a/usr.sbin/moused/moused.c +++ b/usr.sbin/moused/moused.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: moused.c,v 1.25 1999/02/28 09:18:57 yokota Exp $"; + "$Id: moused.c,v 1.26 1999/03/01 04:47:37 gpalmer Exp $"; #endif /* not lint */ #include <err.h> @@ -1507,7 +1507,7 @@ r_protocol(u_char rBuf, mousestatus_t *act) if ((pBuf[0] & ~MOUSE_PS2_BUTTONS) == 0xc8) { /* the extended data packet encodes button and wheel events */ act->dx = act->dy = 0; - act->dz = (pBuf[1] & MOUSE_PS2PLUS_ZNEG) + act->dz = (pBuf[2] & MOUSE_PS2PLUS_ZNEG) ? (pBuf[2] & 0x0f) - 16 : (pBuf[2] & 0x0f); act->button |= ((pBuf[2] & MOUSE_PS2PLUS_BUTTON4DOWN) ? MOUSE_BUTTON4DOWN : 0); |