Skip to content

Commit 0401862

Browse files
Merge pull request #1121 from zoltanvb/input_phys_id
Add better documentation of input_phys autoconf feature.
2 parents 4a286dc + 45c173d commit 0401862

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

docs/guides/controller-autoconfiguration.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The matching algorithm considers several key factors:
5353
- **Device Index (input_device)**: The name of the controller as recognized by the system. The **Device Index** can be identified by navigating to **Settings -> Input -> RetroPad Binds -> Port 1 Controls**.
5454
- **Vendor ID (input_vendor_id)**: A unique identifier assigned to the controller's manufacturer.
5555
- **Product ID (input_product_id)**: A specific identifier for the particular controller model.
56-
- **Physical ID (input_phys_id)**: A manually generated identifier, only valid for one specific controller / USB port. Documentation [in github](https://github.com/libretro/RetroArch/pull/18190) for the time being.
56+
- **Physical ID (input_phys)**: A locally generated identifier in supported drivers, only valid for one specific controller instance / USB port.
5757

5858
### Matching process
5959
RetroArch compares these factors against the files in the autoconfig directorys. It calculates a matching score for each profile, selecting the one with the highest score to configure the controller.
@@ -62,6 +62,23 @@ The combination of Vendor ID and Product ID is often referred to as "vid:pid" in
6262

6363
This automated matching system allows RetroArch to support a vast array of controllers, reducing the need for manual setup in most situations.
6464

65+
### Physical identifier customization
66+
67+
Supported controller drivers (currently, this is only Linux/udev) will interrogate further physical details about the controller: USB port and serial number. The value of this attribute can be determined from RetroArch debug logs. A few examples (serial redacted):
68+
```
69+
[DEBUG] [Autoconf] Config files scanned: driver udev, pad name Microsoft Xbox Series S|X Controller (045e/0b12), phys usb-0000:04:00.0-2/input0, affinity 41
70+
[DEBUG] [Autoconf] Config files scanned: driver udev, pad name Sony Interactive Entertainment Wireless Controller (054c/09cc), phys 28:c1:3c:__:__:__, affinity 50
71+
```
72+
73+
Both identifiers will be queried, but support is not guaranteed. In the example above, one has the USB port, the other has the serial number.
74+
75+
To use the physical identifier for matching, duplicate the existing autoconfig file (to avoid overwriting it when pulling an update), and extend it with the `input_phys` attribute. Partial matches are supported.
76+
```
77+
input_phys = "usb-0000:04:00.0-2"
78+
```
79+
80+
It is also worth to change `display_name`, to immediately see if the match went as expected.
81+
6582
## Autoconfig variable policy
6683

6784
| Controller driver | input_vendor_id/input_product_id required | input_device usage | input_device name variability policy

docs/guides/input-controller-drivers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Multi-mouse support for X11 was added after RetroArch 1.20.0 and requires that R
5151

5252
| Controller driver | Conditions | Rumble support | Autoconfig support |
5353
|-------------------|------------|----------------|--------------------|
54-
| `udev` | Access to the udev interface (see below) | Yes | Yes |
54+
| `udev` | Access to the udev interface (see below) | Yes | Yes (+[physical ID support](../../guides/controller-autoconfiguration/#physical-identifier-customization)) |
5555
| `sdl2` | - | Yes | Yes |
5656
| `linuxraw` | - | No | Yes |
5757
| `parport` | [Special adapter](../../development/retroarch/input/parallel-port-controllers/) on physical parallel port | No | No |

0 commit comments

Comments
 (0)