Files
RetroArch/tasks
LibretroAdmin be9026bf62 Input: several ports may share one controller again
Setting two ports to the same device index lets one pad act as two:
it is how GoldenEye and Perfect Dark get their two-stick control
styles with one controller, and how twin-stick games that read two
ports are played (#19875). Since July that no longer worked. The menu
swapped the other port away when one was stepped onto its pad - with
"All Users Control Menu" off this could leave port 1, the only port
that drives the menu, without one - and the mapping was "repaired" to
one pad per port when it was read, on every hotplug and after a
driver restart.

A repeated index is now the user's choice and is kept everywhere:

- The menu changes only the port being edited. A port on another
  port's pad says so ("shared with Port 2"), so a share made by
  accident is seen rather than silently undone.
- Reading the configuration puts right only an index out of range.
- A hotplug and a driver restart move the lowest port on each pad, as
  before, and the ports sharing its pad follow it. A pad that comes
  back in a slot no port reads is given to its port without
  displacing anyone.

Nothing runs per frame. The frontend harness has a lane for it: an
override's 0 / 0 survives reading and saving, a menu step moves one
port, a reserved pad arriving and a driver restart reporting the pad
elsewhere keep the pair together. With the old menu swap put back the
lane fails. device_registry_test has the unread-slot case.
2026-10-20 21:53:28 +02:00
..
2021-10-15 14:32:07 +02:00