This commit is contained in:
waltje
2017-12-13 22:32:13 -05:00
parent 28426e53af
commit 3a0e1e7d6a
3 changed files with 7 additions and 14 deletions

View File

@@ -49,11 +49,7 @@
* *
* Based on an early driver for MINIX 1.5. * Based on an early driver for MINIX 1.5.
* *
* TODO: Re-integrate the InPort part. Currently, * Version: @(#)mouse_bus.c 1.0.29 2017/12/14
* only the Logitech part is considered to
* be OK.
*
* Version: @(#)mouse_bus.c 1.0.28 2017/12/14
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* *
@@ -249,7 +245,7 @@ ms_read(mouse_t *dev, uint16_t port)
if (dev->but & 0x02) /* RIGHT */ if (dev->but & 0x02) /* RIGHT */
ret |= 0x01; ret |= 0x01;
if (dev->flags & FLAG_3BTN) if (dev->flags & FLAG_3BTN)
if (dev->but & 0x04) /*MIDDLE*/ if (dev->but & 0x04) /* MIDDLE */
ret |= 0x02; ret |= 0x02;
break; break;
@@ -415,12 +411,12 @@ lt_read(mouse_t *dev, uint16_t port)
switch (port) { switch (port) {
case LTMOUSE_DATA: /* [00] data register */ case LTMOUSE_DATA: /* [00] data register */
ret = 0x07; ret = 0x07;
if (dev->but & 0x01) /*LEFT*/ if (dev->but & 0x01) /* LEFT */
ret &= ~0x04; ret &= ~0x04;
if (dev->but & 0x02) /*RIGHT*/ if (dev->but & 0x02) /* RIGHT */
ret &= ~0x01; ret &= ~0x01;
if (dev->flags & FLAG_3BTN) if (dev->flags & FLAG_3BTN)
if (dev->but & 0x04) /*MIDDLE*/ if (dev->but & 0x04) /* MIDDLE */
ret &= ~0x02; ret &= ~0x02;
ret <<= 5; ret <<= 5;
@@ -584,7 +580,6 @@ bm_close(void *priv)
bm_read, NULL, NULL, bm_write, NULL, NULL, dev); bm_read, NULL, NULL, bm_write, NULL, NULL, dev);
free(dev); free(dev);
dev = NULL;
} }

View File

@@ -8,7 +8,7 @@
* *
* Implementation of PS/2 series Mouse devices. * Implementation of PS/2 series Mouse devices.
* *
* Version: @(#)mouse_ps2.c 1.0.4 2017/12/13 * Version: @(#)mouse_ps2.c 1.0.5 2017/12/14
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
*/ */
@@ -261,7 +261,6 @@ ps2_close(void *priv)
keyboard_at_set_mouse(NULL, NULL); keyboard_at_set_mouse(NULL, NULL);
free(dev); free(dev);
dev = NULL;
} }

View File

@@ -10,7 +10,7 @@
* *
* TODO: Add the Genius Serial Mouse. * TODO: Add the Genius Serial Mouse.
* *
* Version: @(#)mouse_serial.c 1.0.17 2017/12/13 * Version: @(#)mouse_serial.c 1.0.18 2017/12/14
* *
* Author: Fred N. van Kempen, <decwiz@yahoo.com> * Author: Fred N. van Kempen, <decwiz@yahoo.com>
*/ */
@@ -205,7 +205,6 @@ sermouse_close(void *priv)
} }
free(dev); free(dev);
dev = NULL;
} }