From 837d2ca0836509e7a0b5601fa5af2aa02a5bb99c Mon Sep 17 00:00:00 2001 From: ksherlock Date: Wed, 4 Jan 2023 19:17:42 -0500 Subject: macabd: fix mouse x/y naming and don't show button 1 as always down (#10786) --- src/mame/apple/macadb.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mame/apple/macadb.cpp b/src/mame/apple/macadb.cpp index cf0881498ee..0808000c782 100644 --- a/src/mame/apple/macadb.cpp +++ b/src/mame/apple/macadb.cpp @@ -473,8 +473,8 @@ int macadb_device::adb_pollmouse() } NewButton = m_mouse0->read() & 0x01; - NewX = m_mouse2->read(); - NewY = m_mouse1->read(); + NewX = m_mouse1->read(); + NewY = m_mouse2->read(); if ((NewX != m_adb_lastmousex) || (NewY != m_adb_lastmousey) || (NewButton != m_adb_lastbutton)) { @@ -489,8 +489,8 @@ void macadb_device::adb_accummouse( uint8_t *MouseX, uint8_t *MouseY ) int MouseCountX = 0, MouseCountY = 0; int NewX, NewY; - NewX = m_mouse2->read(); - NewY = m_mouse1->read(); + NewX = m_mouse1->read(); + NewY = m_mouse2->read(); // printf("pollmouse: X %d Y %d\n", NewX, NewY); @@ -612,8 +612,8 @@ void macadb_device::adb_talk() } //printf("X %x Y %x\n", mouseX, mouseY); m_adb_buffer[0] = (m_adb_lastbutton & 0x01) ? 0x00 : 0x80; - m_adb_buffer[0] |= mouseX & 0x7f; - m_adb_buffer[1] = mouseY & 0x7f; + m_adb_buffer[0] |= mouseY & 0x7f; + m_adb_buffer[1] = (mouseX & 0x7f) | 0x80; m_adb_datasize = 2; break; -- cgit v1.2.3