mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
Merge pull request #576 from hzulla/feature/bigbenff
Add BigBen kid's PS3 gamepad 146b:0902 to filterTrigger()
This commit is contained in:
commit
5edecef9c8
|
@ -339,11 +339,17 @@ void GuiInputConfig::clearAssignment(int inputId)
|
||||||
bool GuiInputConfig::filterTrigger(Input input, InputConfig* config, int inputId)
|
bool GuiInputConfig::filterTrigger(Input input, InputConfig* config, int inputId)
|
||||||
{
|
{
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
// match PlayStation joystick with 6 axes only
|
// on Linux, some gamepads return both an analog axis and a digital button for the trigger;
|
||||||
if((strstr(config->getDeviceName().c_str(), "PLAYSTATION") != NULL \
|
// we want the analog axis only, so this function removes the button press event
|
||||||
|| strstr(config->getDeviceName().c_str(), "PS3 Ga") != NULL \
|
|
||||||
|| strstr(config->getDeviceName().c_str(), "PS(R) Ga") != NULL) \
|
if((
|
||||||
&& InputManager::getInstance()->getAxisCountByDevice(config->getDeviceId()) == 6)
|
// 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
|
// digital triggers are unwanted
|
||||||
if (input.type == TYPE_BUTTON && (input.id == 6 || input.id == 7))
|
if (input.type == TYPE_BUTTON && (input.id == 6 || input.id == 7))
|
||||||
|
|
Loading…
Reference in a new issue