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

Android: Fix unmapped joysticks (default joystick buttonmaps) #25176

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

garbear
Copy link
Member

@garbear garbear commented May 10, 2024

Description

Android ships buttonmaps for hundreds of controllers. When A is pressed, we get the keycode AKEYCODE_BUTTON_A because Android has a buttonmap for this controller.

This PR harnesses Android buttonmaps by extending the default maps for keyboard and mice added in #24512, allowing a default map for joysticks to come from the peripheral bus.

The PR is separated into 4 commits:

  • Commits 1-3: Code improvements depended on by the fix
  • Commit 4: Fixes unmapped joysticks

Motivation and context

Fixes virtually every unmapped controller that Android can map.

Broken out from #24604

How has this been tested?

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

Reports confirm that unmapped joysticks work in Kodi without needing to be mapped.

What is the effect on users?

  • Added buttonmaps for non-generic controllers

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)

@garbear garbear added this to the "P" 22.0 Alpha 1 milestone May 10, 2024
@garbear garbear changed the title Android: Fix unmapped joysticks Android: Fix unmapped joysticks (default joystick buttonmaps) May 10, 2024
@garbear
Copy link
Member Author

garbear commented May 16, 2024

Rebased after merging #25174.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant