Commit 6cc27e82 authored by Patrice Mandin's avatar Patrice Mandin

Aranym now has Joypad emulation. Also mask bits for joypad state, for bits...

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

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403234
parent d695287c
...@@ -219,8 +219,9 @@ int SDL_SYS_JoystickInit(void) ...@@ -219,8 +219,9 @@ int SDL_SYS_JoystickInit(void)
TEST_JOY_ENABLED(envr, "ikbd-joy1", IKBD_JOY1); TEST_JOY_ENABLED(envr, "ikbd-joy1", IKBD_JOY1);
} }
} }
/* Joypads ports only on STE and Falcon */ /* Joypads ports on STE, Falcon and maybe others */
if ((cookie_mch == MCH_STE<<16) || (cookie_mch == MCH_F30<<16)) { if ((cookie_mch == MCH_STE<<16) || (cookie_mch == MCH_F30<<16) ||
(cookie_mch == MCH_ARANYM<<16)) {
TEST_JOY_ENABLED(envr, "porta-pad", PORTA_PAD0); TEST_JOY_ENABLED(envr, "porta-pad", PORTA_PAD0);
if (!atarijoysticks[PORTA_PAD0].enabled) { if (!atarijoysticks[PORTA_PAD0].enabled) {
TEST_JOY_ENABLED(envr, "porta-joy0", PORTA_JOY0); TEST_JOY_ENABLED(envr, "porta-joy0", PORTA_JOY0);
...@@ -437,7 +438,7 @@ void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick) ...@@ -437,7 +438,7 @@ void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick)
numjoypad = 7; break; numjoypad = 7; break;
} }
curstate=jp_joypads[numjoypad]; curstate=jp_joypads[numjoypad] & 0xabffff;
if (curstate!=prevstate) { if (curstate!=prevstate) {
hatstate = SDL_HAT_CENTERED; hatstate = SDL_HAT_CENTERED;
if (curstate & (1<<JP_LEFT)) { if (curstate & (1<<JP_LEFT)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment