Dual Shock 4 Controller analog triggers are digital
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Is there an existing issue for this?
- This is a bug in RetroArch frontend
- I have searched the existing issues
Description
The triggers that are provided by default are digital. I edited the autoconf file Wireless Controller.cfg`` and changed/added
#input_l2_btn = "6"
#input_r2_btn = "7"
input_l2_axis = "+3"
input_r2_axis = "+4"
and
input_l2_axis_label = "L2 Axis"
input_r2_axis_label = "R2 Axis"
to work around this and now they bahave as analog triggers in the core.
But if i want to remap them in the retropad configuration section, where you have to press a button to assign it to a retropad binding, when i do so, the BUTTON is assigned.
I noticed that the dinput device itself has a button and a axis assigned to the trigger. You can see that in the windows gamepad configuration, where a button and the trigger react to pulling it.
This is a difficult matter since the controller itself behaves strange, sending a button press before the trigger is pulled enough to be registered. at least that is my theory.
Maybe it would be better to treat the r2 / l2 triggers as analog and ignore the button input. At the moment there seems no way to archive that without editing files.
Expected behavior
No response
Steps to reproduce the bug
- Start retroarch through emulataionstation with iso and lrps2
- try remap the left right triggers to right stick up/down for core
- they behave digital. either being pressed or not
- try remap l2 / r2 in settings->input->retropad
- only can remap to buttons, not analog
Version/Commit
1.21.0 stable
Bisect Results
No response
Present in the nightly version
Yes, this is reproduced in the nightly build
Platform & operating system
Windows 11 24H2
Affected Cores
LRPS2
Environment information
No response
Relevant log output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DualShock 4 Wireless Controller.cfg autoconf entries and the Settings > Input > Retropad remapping flow described in the report. Reproduce on Windows with the nightly build and LRPS2, then verify that L2 and R2 can be assigned and behave as analog triggers without requiring manual configuration edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100