fixed two bugs regarding Joy2B+ controller

This commit is contained in:
Thomas Jentzsch 2022-12-20 11:07:53 +01:00
parent 54993268c7
commit 82da36dd68
2 changed files with 2 additions and 1 deletions

View File

@ -127,7 +127,7 @@ string Controller::getPropName(const Type type)
"AMIGAMOUSE", "ATARIMOUSE", "ATARIVOX", "BOOSTERGRIP", "COMPUMATE", "AMIGAMOUSE", "ATARIMOUSE", "ATARIVOX", "BOOSTERGRIP", "COMPUMATE",
"DRIVING", "GENESIS", "JOYSTICK", "KEYBOARD", "KIDVID", "MINDLINK", "DRIVING", "GENESIS", "JOYSTICK", "KEYBOARD", "KIDVID", "MINDLINK",
"PADDLES", "PADDLES_IAXIS", "PADDLES_IAXDR", "SAVEKEY", "TRAKBALL", "PADDLES", "PADDLES_IAXIS", "PADDLES_IAXDR", "SAVEKEY", "TRAKBALL",
"LIGHTGUN", "QUADTARI", "JOY2B+" "LIGHTGUN", "QUADTARI", "JOY_2B+"
}; };
return PROP_NAMES[static_cast<int>(type)]; return PROP_NAMES[static_cast<int>(type)];

View File

@ -169,6 +169,7 @@ bool GlobalKeyHandler::isJoystick(const Controller& controller)
return controller.type() == Controller::Type::Joystick return controller.type() == Controller::Type::Joystick
|| controller.type() == Controller::Type::BoosterGrip || controller.type() == Controller::Type::BoosterGrip
|| controller.type() == Controller::Type::Genesis || controller.type() == Controller::Type::Genesis
|| controller.type() == Controller::Type::Joy2BPlus
|| (controller.type() == Controller::Type::QuadTari || (controller.type() == Controller::Type::QuadTari
&& (isJoystick(static_cast<const QuadTari*>(&controller)->firstController()) && (isJoystick(static_cast<const QuadTari*>(&controller)->firstController())
|| isJoystick(static_cast<const QuadTari*>(&controller)->secondController()))); || isJoystick(static_cast<const QuadTari*>(&controller)->secondController())));