Dual Shock 4 Controller analog triggers are digital
Is there an existing issue for this?
- [x] This is a bug in RetroArch frontend
- [x] 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
Hi,
I presume you are talking about this file Wireless Controller.cfg ?
If so, it will be better to open an issue/PR to the retroarch-joypad-autoconfig repository.
Thank you.
The issue does is not the Wireless Controller.cfg
the dualshock 4 controller sends additional button presses, when the triggers are pulled.
maybe there should be a setting in the ui to ignore these, so that the axis of the trigger can be used.
my way of editing the file is not really convinient, is what i am trying t say.