mirror of
https://github.com/libretro/docs.git
synced 2024-11-23 16:59:40 +00:00
Update controller-autoconfiguration.md
linuxraw depends on multiple Device Indexes
This commit is contained in:
parent
3031bada52
commit
34d4c93a20
@ -216,41 +216,27 @@ This dual functionality ensures that RetroArch can correctly identify and apply
|
||||
|
||||
Importantly, this name remains consistent across various controller drivers, such as udev, sdl2, and linuxraw, as specified in **Settings > Drivers > Controller**.
|
||||
|
||||
#### Variability of the Device Index
|
||||
### linuxraw depends on multiple Device Indexes
|
||||
|
||||
The Device Index may change depending on the version of the system, particularly the Linux kernel version. To ensure compatibility, we utilize the most recent Device Index that is supported by the system.
|
||||
The linuxraw controller driver relies on the `input_device` variable in the autoconfig file generated by the Device Index (described below) and does not use the `input_vendor_id` or `input_product_id` variables in the autoconfig file.
|
||||
|
||||
#### Example: Nintendo Switch Pro Controller on GNU/Linux
|
||||
The Device Index may vary depending on the system version, particularly the Linux kernel version. To ensure compatibility, you must compare the Device Index across different Linux kernels and generate autoconfig files when they differ. The easiest way to do this is to run GNU/Linux distributions in live mode or as installed virtual machines.
|
||||
|
||||
The following table illustrates how the Device Index for the Nintendo Switch Pro Controller varies across different Linux kernel versions, along with its HID support and corresponding autoconfig file names. As a side-note, the notation "(default-off)" indicates that the configuration is disabled by default to avoid
|
||||
#### Example: Nintendo Switch Pro Controller
|
||||
|
||||
| Linux Kernel Version | Device Index in RetroArch | Nintendo Switch Pro Controller HID Support | Selected Device Index for the autoconfiguration file |
|
||||
|----------------------|-------------------------------------------|-------------------------------------------|----------------------------------------------|
|
||||
| 5.15 | Pro Controller | No | Pro Controller |
|
||||
| 5.19 | Nintendo Switch Pro Controller | Yes | |
|
||||
| 6.2.0 | Nintendo Switch Pro Controller | Yes | |
|
||||
| 6.8.0 | Nintendo Co., Ltd. Pro Controller | Yes | Nintendo Co.,Ltd. Pro Controller |
|
||||
| Linux Kernel Version | HID Support | Device Index in RetroArch |
|
||||
|----------------------|-------------|-----------------------------------|
|
||||
| 5.15 | No | Pro Controller |
|
||||
| 5.19 | Yes | Nintendo Switch Pro Controller |
|
||||
| 6.2.0 | Yes | Nintendo Switch Pro Controller |
|
||||
| 6.8.0 | Yes | Nintendo Co., Ltd. Pro Controller |
|
||||
|
||||
##### Configuration file examples
|
||||
In the above list, three unique Device Index entries are identified, which require these autoconfig files for the controller to be identified for linuxraw:
|
||||
- `Pro Controller.cfg` with variable: `input_device = "Pro Controller"`
|
||||
- `Nintendo Switch Pro Controller.cfg` with variable: `input_device = "Nintendo Switch Pro Controller"`
|
||||
- `Nintendo Co., Ltd. Pro Controller.cfg` with variable: `input_device = "Nintendo Co., Ltd. Pro Controller"`
|
||||
|
||||
###### Pro Controller (default-off).cfg
|
||||
```
|
||||
# This file uses the legacy Device Index "Pro Controller" (generated by RetroArch on Linux 5.15)
|
||||
# "(default-off)" was added to the file name to indicate that the autoconfig file is not active by default. See comments for input_vendor_id and input_product_id.
|
||||
input_device = "Pro Controller"
|
||||
# Due to the uncommon nature of this device, the autoconfig file is not active by default. This precaution is taken to avoid potential conflicts with the widely-used Nintendo Switch Pro Controller (nintendo-hid version) file. Button layouts are not compatible. To activate this configuration:
|
||||
# 1) Comment out the input_vendor_id and input_product_id lines in the "Nintendo Co.,Ltd. Pro Controller.cfg" file.
|
||||
# 2) Uncomment the input_vendor_id and input_product_id lines below:
|
||||
# input_vendor_id = "1406"
|
||||
# input_product_id = "8201"
|
||||
```
|
||||
|
||||
###### Nintendo Co.,Ltd. Pro Controller.cfg
|
||||
```
|
||||
input_device = "Nintendo Co.,Ltd. Pro Controller"
|
||||
input_vendor_id = "1406"
|
||||
input_product_id = "8201"
|
||||
```
|
||||
*Note: The rest of the file should be a copy of the previous entry, `Nintendo Switch Pro Controller.cfg`, since both have HID support.*
|
||||
|
||||
## Troubleshooting
|
||||
If your joypad is not configured properly, you should [generate a RetroArch log](/docs/guides/generating-retroarch-logs.md). Your log will show if a profile has been matched for your pad and the path of the corresponding profile.
|
||||
|
Loading…
Reference in New Issue
Block a user