diff src/joystick/mint/SDL_sysjoystick.c @ 4156:de46a1bfcbdb SDL-1.2

Aranym now has Joypad emulation. Also mask bits for joypad state, for bits only used for buttons, to avoid generating events when dummy bits are set
author Patrice Mandin <patmandin@gmail.com>
date Wed, 05 Nov 2008 20:08:17 +0000
parents 28db418c7573
children a1b03ba2fcd0
line wrap: on
line diff
--- a/src/joystick/mint/SDL_sysjoystick.c	Mon Oct 13 20:50:20 2008 +0000
+++ b/src/joystick/mint/SDL_sysjoystick.c	Wed Nov 05 20:08:17 2008 +0000
@@ -219,8 +219,9 @@
 				TEST_JOY_ENABLED(envr, "ikbd-joy1", IKBD_JOY1);
 			}
 		}
-		/* Joypads ports only on STE and Falcon */
-		if ((cookie_mch == MCH_STE<<16) || (cookie_mch == MCH_F30<<16)) {
+		/* Joypads ports on STE, Falcon and maybe others */
+		if ((cookie_mch == MCH_STE<<16) || (cookie_mch == MCH_F30<<16) ||
+			(cookie_mch == MCH_ARANYM<<16)) {
 			TEST_JOY_ENABLED(envr, "porta-pad", PORTA_PAD0);
 			if (!atarijoysticks[PORTA_PAD0].enabled) {
 				TEST_JOY_ENABLED(envr, "porta-joy0", PORTA_JOY0);
@@ -437,7 +438,7 @@
 						numjoypad = 7;	break;
 				}				
 				
-				curstate=jp_joypads[numjoypad];
+				curstate=jp_joypads[numjoypad] & 0xabffff;
 				if (curstate!=prevstate) {
 					hatstate = SDL_HAT_CENTERED;
 					if (curstate & (1<<JP_LEFT)) {