diff options
author | yz70s <yz70s@users.noreply.github.com> | 2020-07-25 16:04:24 +0200 |
---|---|---|
committer | yz70s <yz70s@users.noreply.github.com> | 2020-07-25 16:11:26 +0200 |
commit | 97a680d67d56ecdfe8ff15943148a1e4cef796ef (patch) | |
tree | 447ee7d8fb1bfb151cedda0552035971c6160d0e | |
parent | 10302ecd6d8afedc487d8e30ab1911a0a85b40bd (diff) |
8042kbdc.cpp: generate data for mouse only if mouse is enabled
Now it is possible to use the nforcepc bios setup without it crashing.
-rw-r--r-- | src/devices/machine/8042kbdc.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index b2ce8b6743e..1e904888344 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -209,7 +209,8 @@ void kbdc8042_device::device_timer(emu_timer &timer, device_timer_id id, int par if (id == TIMER_UPDATE) { at_8042_check_keyboard(); - at_8042_check_mouse(); + if (m_mouse.on) + at_8042_check_mouse(); } } @@ -277,7 +278,8 @@ uint8_t kbdc8042_device::data_r(offs_t offset) case 4: at_8042_check_keyboard(); - at_8042_check_mouse(); + if (m_mouse.on) + at_8042_check_mouse(); if (m_keyboard.received || m_mouse.received) data |= 1; @@ -321,7 +323,7 @@ void kbdc8042_device::data_w(offs_t offset, uint8_t data) switch (m_operation_write_state) { case 0: m_data = data; - m_sending=1; + m_sending = 1; m_keyboard_dev->write(data); break; |