SDL-1.2: atari🕹 fix fire button reporting

From 0569bc61fe2ad18c8adbba72225d546336242999 Mon Sep 17 00:00:00 2001
From: Miro Kropacek <[EMAIL REDACTED]>
Date: Fri, 17 May 2024 22:28:59 +0200
Subject: [PATCH] atari:joystick: fix fire button reporting

As port 0 is supposed to be always occupied by mouse, fire button on
port 1 is never reported as part of the joystick packet.

This is because the right mouse button on port 0 is wired to the fire
button on port 1 and IKBD reports fire button on port 1 only if mouse
reporting on port 0 is disabled (what we certainly don't want).
---
 src/joystick/mint/SDL_sysjoystick.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/joystick/mint/SDL_sysjoystick.c b/src/joystick/mint/SDL_sysjoystick.c
index e525508b..e09579ce 100644
--- a/src/joystick/mint/SDL_sysjoystick.c
+++ b/src/joystick/mint/SDL_sysjoystick.c
@@ -300,7 +300,7 @@ int SDL_SYS_JoystickInit(void)
 			atarijoysticks[PORTB_PAD3].enabled = SDL_TRUE;
 	}
 	if (!atarijoysticks[IKBD_JOY1].enabled) {
-		atarijoysticks[XBIOS_JOY1].enabled=SDL_AtariXbios_enabled;
+		atarijoysticks[XBIOS_JOY1].enabled=(SDL_AtariXbios_enabled!=0);
 	}
 
 	/* Read environment for joysticks to enable */
@@ -505,9 +505,11 @@ void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick)
 
 				if (numjoystick==IKBD_JOY1) {
 					curstate = SDL_AtariIkbd_joystick & 0xff;
+					curstate |= (SDL_AtariIkbd_mouseb & 0x01) << 7;
 				}
 				if (numjoystick==XBIOS_JOY1) {
 					curstate = SDL_AtariXbios_joystick & 0xff;
+					curstate |= (SDL_AtariXbios_mouseb & 0x01) << 7;
 				}
 
 				if (curstate != prevstate) {