"Mapped port" input discarded while corresponding controller is disconnected
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
Given two controllers connected with the "dinput" input driver and "xinput" controller driver, both mapped to core port 1, when the primary controller (player 1) is disconnected, the secondary controller (player 2) is no longer functional until primary is reconnected. RetroArch confirms via OSD that secondary has been remapped as controller 1, but core receives no input data for port 1 until the original controller 1 is reconnected.
Using the dinput controller driver instead of xinput produces the expected result but precludes usage of the Guide button for RetroArch hotkeys, so I'm filing this issue to petition for a solution on xinput's side.
Expected behavior
With two controllers mapped to port 1, each should continue controlling port 1 even if the other is disconnected.
Actual behavior
Secondary controller no longer controls port 1 when primary controller is disconnected.
Steps to reproduce the bug
- Set dinput input driver and xinput controller driver
- Set player 2's "mapped port" to 1
- Turn on two controllers
- Launch a game
- Disconnect the controller that was connected first
- Observe that the controller connected second no longer works
Version/Commit
- RetroArch: v1.9.7 (official)
Environment information
- OS: Windows 10 Pro x64 20H1
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 by reproducing the disconnect and remapping sequence on Windows with the dinput input driver and xinput controller driver. Read the xinput controller-driver handling around controller disconnects and mapped ports, then verify that the remaining controller still delivers input to port 1 after the original controller is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100