Skip to content

Conversation

@nijm
Copy link
Contributor

@nijm nijm commented Oct 26, 2025

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:

  • 2x 8BitDo M30 6 button MegaDrive style controllers
  • 2x SNES style controllers
  • 2x PSX style 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:

  • user 1: 8BitDo MD controller
  • user 2: 8BitDo MD controller
  • user 3: SNES Controller
  • user 4: SNES Controller
  • user 5: PSX Controller
  • user 6: PSX Controller

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

screenshot0_setting screenshot1_mapped_notification screenshot2_user4_mapped_port_0 screenshot3_user0_mapped_port_none

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

@hizzlekizzle
Copy link
Collaborator

This is a major (optional) change for most platforms, but it's similar to how Android has always worked--though I guess only at a core level rather than the frontend level.

A significant number of users want to use specific original-style controllers, and this seems like a nice way of streamlining that process.

@sonninnos

@nijm nijm marked this pull request as draft October 28, 2025 18:00
@nijm nijm force-pushed the input_remap_on_button_press branch from cc124e7 to cc04d24 Compare November 1, 2025 10:18
The first user to press a button is mapped to core port 1 (player 1),
the second is mapped to core port 2 (player 2), and so on.

Configured by the input_remap_on_button_press option. When enabled, all
users are unmapped by default (assigned to 'None'/MAX_USERS).
@nijm nijm force-pushed the input_remap_on_button_press branch from cc04d24 to da110c4 Compare November 1, 2025 10:26
@nijm nijm marked this pull request as ready for review November 1, 2025 10:27
@nijm
Copy link
Contributor Author

nijm commented Nov 1, 2025

Rebased on master as there were some conflicting changes in input_driver_poll. Also made it compatible with the input overlay, which I hadn't considered before.

@nijm nijm mentioned this pull request Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants