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

BACKEND: Allow SDL2 mapping of L2/R2, fix psp2/switch mapping #2046

Merged
merged 2 commits into from Feb 9, 2020

Conversation

@rsn8887
Copy link
Contributor

rsn8887 commented Feb 7, 2020

This PR

  • implements SDL2 game controller mapping of L2/R2 trigger buttons via the keymapper, similar to how it is done in DevilutionX.
  • fixes the default button names for switch and psp2, so that "cross", "circle" etc. is displayed in the keymapper.
@rsn8887 rsn8887 requested a review from bgK Feb 7, 2020
@rsn8887 rsn8887 force-pushed the rsn8887:triggersupport branch from a0f93e6 to 7001bb6 Feb 7, 2020
@rsn8887

This comment has been minimized.

Copy link
Contributor Author

rsn8887 commented Feb 7, 2020

Tested working on Switch

@rsn8887 rsn8887 force-pushed the rsn8887:triggersupport branch from 7001bb6 to f0d0364 Feb 7, 2020
@bgK

This comment has been minimized.

Copy link
Member

bgK commented Feb 8, 2020

I'd prefer if we followed the SDL2 event model as far as standard game controller buttons / axes are concerned. For them left and right triggers are axes, not buttons. I know it does not fit the Switch very well. I've pushed to your branch a commit that enables the keymapper to remap half-axes to actions. It should accomplish the same end result, but without having a hardcoded mapping from an axis to a button in the SDL backend. Is that ok with you?

@rsn8887

This comment has been minimized.

Copy link
Contributor Author

rsn8887 commented Feb 8, 2020

That’s even better, thanks.

@rsn8887

This comment has been minimized.

Copy link
Contributor Author

rsn8887 commented Feb 8, 2020

Tested working on Switch. I think this is ready to merge if you agree @bgK.

@rsn8887

This comment has been minimized.

Copy link
Contributor Author

rsn8887 commented Feb 8, 2020

Hmm something is wrong the analog trigger seems to get stuck. The button down is recognized but not button up it seems

@bgK bgK force-pushed the rsn8887:triggersupport branch from 1892911 to bebcd03 Feb 8, 2020
@rsn8887

This comment has been minimized.

Copy link
Contributor Author

rsn8887 commented Feb 8, 2020

Ok everything works now, thanks! Ready to merge.

@rsn8887 rsn8887 merged commit 2177e68 into scummvm:master Feb 9, 2020
2 checks passed
2 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.