Fixed the InPort mouse, again.

This commit is contained in:
OBattler
2018-05-22 21:33:03 +02:00
parent 22d387c156
commit 2807291276

View File

@@ -49,7 +49,7 @@
*
* Based on an early driver for MINIX 1.5.
*
* Version: @(#)mouse_bus.c 1.0.35 2018/05/21
* Version: @(#)mouse_bus.c 1.0.36 2018/05/22
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -255,21 +255,23 @@ ms_write(mouse_t *dev, uint16_t port, uint8_t val)
case MSMOUSE_DATA:
picintc(1 << dev->irq);
if (val == MSDATA_IRQ) {
if (val == MSDATA_IRQ)
picint(1 << dev->irq);
} else {
else {
switch (dev->r_cmd) {
case MSCTRL_COMMAND:
valxor = (dev->r_ctrl ^ val);
if (valxor & MSCTRL_FREEZE) {
if (val & LTCTRL_FREEZE) {
if (val & MSCTRL_FREEZE) {
/* Hold the sampling while we do something. */
dev->flags |= FLAG_FROZEN;
} else {
/* Reset current state. */
dev->flags &= ~FLAG_FROZEN;
}
dev->x = dev->y = 0;
dev->but = 0;
}
}
@@ -284,6 +286,7 @@ ms_write(mouse_t *dev, uint16_t port, uint8_t val)
default:
break;
}
}
break;
case MSMOUSE_MAGIC: