libretro / libretro/RetroArch

Dual Shock 4 Controller analog triggers are digital

Open
#17,965 2 comments 0 reactions 0 assignees View on GitHub

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
  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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.