add Joy2B+ support to libretro (#950)

fixes #949 and returns input to Elevator Agent game
This commit is contained in:
hunterk 2023-01-05 01:33:14 -06:00 committed by GitHub
parent 8ded49c33a
commit e14af76eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -86,6 +86,10 @@ static void update_input()
case Controller::Type::Genesis:
MASK_EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
[[fallthrough]];
case Controller::Type::Joy2BPlus:
MASK_EVENT(Event::LeftJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
MASK_EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
[[fallthrough]];
case Controller::Type::Joystick:
MASK_EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
MASK_EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
@ -142,6 +146,10 @@ static void update_input()
case Controller::Type::Genesis:
MASK_EVENT(Event::RightJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
[[fallthrough]];
case Controller::Type::Joy2BPlus:
MASK_EVENT(Event::LeftJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
MASK_EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
[[fallthrough]];
case Controller::Type::Joystick:
MASK_EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
MASK_EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);