Skip to content

Commit

Permalink
Merge pull request RetroPie#576 from hzulla/feature/bigbenff
Browse files Browse the repository at this point in the history
Add BigBen kid's PS3 gamepad 146b:0902 to filterTrigger()
  • Loading branch information
psyke83 authored Aug 30, 2019
2 parents 0476cae + 6cc53a6 commit 00484c8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions es-core/src/guis/GuiInputConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,17 @@ void GuiInputConfig::clearAssignment(int inputId)
bool GuiInputConfig::filterTrigger(Input input, InputConfig* config, int inputId)
{
#if defined(__linux__)
// match PlayStation joystick with 6 axes only
if((strstr(config->getDeviceName().c_str(), "PLAYSTATION") != NULL \
|| strstr(config->getDeviceName().c_str(), "PS3 Ga") != NULL \
|| strstr(config->getDeviceName().c_str(), "PS(R) Ga") != NULL) \
&& InputManager::getInstance()->getAxisCountByDevice(config->getDeviceId()) == 6)
// on Linux, some gamepads return both an analog axis and a digital button for the trigger;
// we want the analog axis only, so this function removes the button press event

if((
// match PlayStation joystick with 6 axes only
strstr(config->getDeviceName().c_str(), "PLAYSTATION") != NULL
|| strstr(config->getDeviceName().c_str(), "PS3 Ga") != NULL
|| strstr(config->getDeviceName().c_str(), "PS(R) Ga") != NULL
// BigBen kid's PS3 gamepad 146b:0902, matched on SDL GUID because its name "Bigben Interactive Bigben Game Pad" may be too generic
|| strcmp(config->getDeviceGUIDString().c_str(), "030000006b1400000209000011010000") == 0
) && InputManager::getInstance()->getAxisCountByDevice(config->getDeviceId()) == 6)
{
// digital triggers are unwanted
if (input.type == TYPE_BUTTON && (input.id == 6 || input.id == 7))
Expand Down

0 comments on commit 00484c8

Please sign in to comment.