Allow permanent assignment of controllers to retroarch "ports"
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
At present, RetroArch picks up any attached controller and providing autoconfig is enabled it will assign the controllers to global port numbers. Those port numbers can then re-routed in cores with a Core Remap. However this functionality is currently absolutely useless.
The system decides the order in which gamepad devices appear to how RetroArch sees them. So, with a system that has 8 different controllers attached, if a single one of them is not present then the ports are assigned differently. This makes all of the Core Remap overrides entirely wrong and just useless. It's very difficult if not impossible to get the devices to appear in the same order every time so even if all devices were connected at once the order is never consistent.
Proposed Solution
The solution to this, in my view, is to add a section to remember the port of the controller if the user decides it should be set that way. For example keep a set of assigned ports, and a set of "free" unassigned ports. Whenever a controller is connected which does not have an assigned port set then it should be put into one of the "free" ports. Otherwise, look up it's port number and assign it.
Xbox One controller port 1, Arcade stick 1 port 7, Arcade stick 2 port 8, SNES controller port 3, etc. Then in the cores set the ports as desired as Core Remap.
P.S. If this is already possible, then apologises for opening an issue about it, but I can't find a way to do it with the current version.
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
No files, tests, or entry points are named. Start by tracing controller autoconfiguration and the existing port-assignment flow, then determine how persistent controller-to-port mappings and free-port allocation should interact with core remaps. Done means a controller keeps its selected port across reconnections while unassigned controllers use available ports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100