From 9175d060f5417cad2406391e64267db6e010df25 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 24 Nov 2022 20:54:28 +0100 Subject: [PATCH] Ignore the internal mouse on the Olivetti machine if the mouse is not set to internal, fixes serial mouse on both the Olivetti M24 and M240, closes #2880. --- src/machine/m_xt_olivetti.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index d92df9f10..c978e2caf 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -1385,10 +1385,12 @@ m24_kbd_init(m24_kbd_t *kbd) m24_kbd_reset(kbd); timer_add(&kbd->send_delay_timer, m24_kbd_poll, kbd, 1); - /* Tell mouse driver about our internal mouse. */ - mouse_reset(); - mouse_set_buttons(2); - mouse_set_poll(ms_poll, kbd); + if (mouse_type == MOUSE_TYPE_INTERNAL) { + /* Tell mouse driver about our internal mouse. */ + mouse_reset(); + mouse_set_buttons(2); + mouse_set_poll(ms_poll, kbd); + } keyboard_set_table((kbd->id == 0x01) ? scancode_olivetti_m24_deluxe : scancode_olivetti_m240); keyboard_set_is_amstrad(0);