From 7409dfc02655857e1e8fc290fbd9ddcbe64a2aa0 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 4 Dec 2017 20:10:59 +0200 Subject: [PATCH] Removed 91078-01 CIA bug behavior from joystick fire/mouse left button handling. --- inputdevice.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/inputdevice.cpp b/inputdevice.cpp index d84fff02..562f889e 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -3440,6 +3440,10 @@ uae_u8 handle_joystick_buttons (uae_u8 pra, uae_u8 dra) if (!cd32padmode (p5dir, p5dat)) { if (getbuttonstate (i, JOYBUTTON_CD32_RED) || getbuttonstate (i, JOYBUTTON_1)) but &= ~mask; + // always zero if output=1 and data=0 + if ((dra & mask) && !(pra & mask)) { + but &= ~mask; + } } } else { if (!getbuttonstate (i, JOYBUTTON_1)) @@ -3449,8 +3453,10 @@ uae_u8 handle_joystick_buttons (uae_u8 pra, uae_u8 dra) if (uaerand () & 1) but |= mask; } - if (dra & mask) - but = (but & ~mask) | (pra & mask); + // always zero if output=1 and data=0 + if ((dra & mask) && !(pra & mask)) { + but &= ~mask; + } } } -- 2.47.3