Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joysticks: Fix mapping PS4 trigger analog semiaxes #25175

Merged
merged 1 commit into from May 16, 2024

Conversation

garbear
Copy link
Member

@garbear garbear commented May 10, 2024

Description

Background: Rapid input is dropped when buttonmapping, because some controllers send multiple events per button press with different button IDs.

For example, on many PlayStation controllers, the triggers send an analog event, and a digital event when the trigger crosses about halfway. The 0.5 analog event arrives shortly before or shortly after the digital event.

The bug: If the digital button is ignored, the analog event may be detected as rapid input and dropped.

The fix: Prioritizing the "IsIngored" check.

Motivation and context

Fix is broken out from #24604, as it doesn't touch Android.

How has this been tested?

Tested as part of my RetroPlayer builds since January: https://github.com/garbear/xbmc/releases

What is the effect on users?

  • Improved trigger detection in controller button mapper

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Rapid input is dropped when buttonmapping, because some controllers send
multiple events per button press with different button IDs.

For example, on many PlayStation controllers, the triggers send an analog
event, and a digital event when the trigger crosses about halfway. The 0.5
analog event arrives shortly before or shortly after the digital  event.

The bug: If the digital button is ignored, the analog event may be detected
as rapid input and dropped. This is fixed by prioritizing the "IsIngored"
check.
@garbear garbear added Type: Fix non-breaking change which fixes an issue Backport: Needed Component: Input v22 "P" labels May 10, 2024
@garbear garbear added this to the "P" 22.0 Alpha 1 milestone May 10, 2024
@garbear garbear merged commit de81598 into xbmc:master May 16, 2024
2 checks passed
@garbear garbear deleted the fix-mapping-triggers branch May 16, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport: Needed Component: Input Type: Fix non-breaking change which fixes an issue v22 "P"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant