RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

Dual Shock 4 Controller analog triggers are digital

Open Mitschmaster opened this issue 7 months ago • 2 comments

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

  1. Start retroarch through emulataionstation with iso and lrps2
  2. try remap the left right triggers to right stick up/down for core
  3. they behave digital. either being pressed or not
  4. try remap l2 / r2 in settings->input->retropad
  5. 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


Mitschmaster avatar May 31 '25 11:05 Mitschmaster

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.

gouchi avatar Jun 05 '25 08:06 gouchi

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.

Mitschmaster avatar Jun 06 '25 11:06 Mitschmaster