Map users to core ports on first button press #18331
Open
+323
−46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The first user to press a button is mapped to core port 0 (player 1), the second is mapped to core port 1 (player 2), and so on.
Adds a 'None' option to the 'Mapped Port' setting for each user under Quick Menu->Controls->Port N Controls.
Configured by the input_remap_on_button_press option. When enabled, all users are unmapped by default (assigned to 'None'/MAX_USERS).
Hotkeys are still only usable by user 0. I have another PR to address that: Hotkeys follow player 1 #18353
My Use Case
I have 6 wireless controllers:
I prefer to play games with the type of controller they were designed for, but I like having the option to use any of them. Each pair of controllers is identical, so it's hard to know if I've picked up SNES controller 1 or 2 - with this feature I can use either.
With the existing device type reservation feature I ensure each controller type is always mapped to the same 2 users:
With core input remapping files I can map the core controls in a sensible way for each controller type. This depends on each controller type always being mapped to the same users. I leave the mapped port setting unset and disable saving the remapping file on exit.
Screenshots
Related Issues
Controller Priority Option (request)
#6707
Related Pull Requests
Hotkeys follow player 1 #18353
Works well with this merged PR:
Controller device reservation / preference.
#16647