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

[Input] Default buttonmaps for keyboard and mouse #24512

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

garbear
Copy link
Member

@garbear garbear commented Jan 15, 2024

Description

This PR provides buttonmaps for the default keyboard and mouse controllers to allow for keyboard/mouse input without peripheral.joystick installed or enabled.

The first three commits are renames/refactors with no functional change.

The final commit provides the default buttonmaps, and includes test cases to make sure they are correct. The test cases actually caught a bug in the existing code where the left/right meta keys were swapped.

Motivation and context

When testing the keyboard and mouse added to the Player Viewer in #24406, I noticed that when peripheral.joystick was disabled, there was no keyboard/mouse input.

How has this been tested?

  • Compiles successfully on Windows/Ubuntu/macOS.
  • Two new test files were added, both pass tests.
  • Brief runtime testing confirmed that keyboard/mouse work without peripheral.joystick.

Included in my latest round of test builds: https://github.com/garbear/xbmc/releases

What is the effect on users?

  • Fixed keyboard/mouse input in game if peripheral.joystick isn't present

Screenshots (if appropriate):

screenshot00004

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 Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality Component: Input v21 Omega labels Jan 15, 2024
@garbear garbear added this to the Omega 21.0 Beta 3 milestone Jan 15, 2024
Used as a fallback in case the joystick add-on isn't available.
@garbear
Copy link
Member Author

garbear commented Jan 17, 2024

I rebased after merging #24501. This PR should be a lot more reviewable now, as it's now virtually entirely new code.

@garbear
Copy link
Member Author

garbear commented Jan 20, 2024

Planning on merging in 24 hrs if no comments. Jenkins build this please.

@garbear garbear merged commit 28aaccf into xbmc:master Jan 22, 2024
2 checks passed
@garbear garbear deleted the default-maps branch January 22, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Input Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant