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

xinput: allow to map triggers as positive or negative #15932

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Aug 13, 2024

By pressing ALT while clicking on a button in the pad settings, you can now enable a special mode for XInput.
This allows you to map the XInput triggers as positive or negative triggers.

We previously basically always treated XInput triggers as buttons. So you could only map pressing the trigger to a button.
The special mode will treat triggers that are pressed more than 50% as positive triggers and triggers that are pressed less than 50% as negative triggers.
You can therefore map a trigger to an entire stick axis, for example by mapping LT+ to LY+ and LT- to LY-.

This has only become feasible recently when I implemented that the initial state is ignored during a re-map.
In order to map a negative trigger, you will have to press the trigger before clicking one of the buttons in the pad settings dialog (with ALT). Then by releasing the trigger it will be recognized as negative.

You can still map the normal trigger behaviour to other buttons, even if it is already mapped as positive or negative trigger somewhere else.

The stick thresholds are ignored for these new trigger types. I can add them at a later point if needed.
Currently this is only useful for Rock Band guitar switches.

maybe fixes #12384

@Megamouse Megamouse merged commit 7bcaab4 into RPCS3:master Aug 13, 2024
5 of 6 checks passed
@Megamouse Megamouse deleted the axistrigger branch August 13, 2024 18:16
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.

Rock Band 2 guitar selector switch and overdrive
1 participant