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 /sys | |
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 'sys')
-rw-r--r-- | sys/dev/atkbdc/psm.c | 4 | ||||
-rw-r--r-- | sys/isa/psm.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 1d1589c..74438dc 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.9 1999/05/09 13:00:43 phk Exp $ + * $Id: psm.c,v 1.10 1999/05/30 16:52:47 phk Exp $ */ /* @@ -1838,7 +1838,7 @@ psmintr(void *arg) if ((c & ~MOUSE_PS2_BUTTONS) == 0xc8) { /* the extended data packet encodes button and wheel events */ x = y = 0; - z = (sc->ipacket[1] & MOUSE_PS2PLUS_ZNEG) + z = (sc->ipacket[2] & MOUSE_PS2PLUS_ZNEG) ? (sc->ipacket[2] & 0x0f) - 16 : (sc->ipacket[2] & 0x0f); ms.button |= (sc->ipacket[2] & MOUSE_PS2PLUS_BUTTON4DOWN) ? MOUSE_BUTTON4DOWN : 0; diff --git a/sys/isa/psm.c b/sys/isa/psm.c index 1d1589c..74438dc 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -20,7 +20,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: psm.c,v 1.9 1999/05/09 13:00:43 phk Exp $ + * $Id: psm.c,v 1.10 1999/05/30 16:52:47 phk Exp $ */ /* @@ -1838,7 +1838,7 @@ psmintr(void *arg) if ((c & ~MOUSE_PS2_BUTTONS) == 0xc8) { /* the extended data packet encodes button and wheel events */ x = y = 0; - z = (sc->ipacket[1] & MOUSE_PS2PLUS_ZNEG) + z = (sc->ipacket[2] & MOUSE_PS2PLUS_ZNEG) ? (sc->ipacket[2] & 0x0f) - 16 : (sc->ipacket[2] & 0x0f); ms.button |= (sc->ipacket[2] & MOUSE_PS2PLUS_BUTTON4DOWN) ? MOUSE_BUTTON4DOWN : 0; |