Skip to content

Commit 344f870

Browse files
authored
Merge pull request #984 from davidhedlund/patch-18
Update controller-autoconfiguration.md -- The `android`, `udev`, and `sdl2` drivers can use either the Device Index (`input_device`) or a combination of Vendor ID (`input_vendor_id`) and Product ID (`input_product_id`) -- Thanks zoltanvb!
2 parents 4bc6ef6 + 16d29bc commit 344f870

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/guides/controller-autoconfiguration.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The matching algorithm considers several key factors:
1515

1616
Different controller drivers use these identifiers in various ways:
1717

18-
- The `android` and `sdl2` drivers utilize both the Vendor ID (input_vendor_id) and Product ID (input_product_id).
19-
- The `linuxraw` and `udev` drivers rely on the Device Index (input_device).
18+
- The `android`, `udev`, and `sdl2` drivers can use either the Device Index (`input_device`) or a combination of Vendor ID (`input_vendor_id`) and Product ID (`input_product_id`). If the Device Index is configured incorrectly, the system will fall back on checking the Vendor ID and Product ID, and vice versa. References: input_autoconfigure_get_config_file_affinity in (task_autodetect.c)[https://github.com/libretro/RetroArch/blob/master/tasks/task_autodetect.c], and `input_autoconfigure_connect` in [android_input.c](https://github.com/libretro/RetroArch/blob/master/input/drivers/android_input.c), [sdl_joypad.c](https://github.com/libretro/RetroArch/blob/master/input/drivers_joypad/sdl_joypad.c), [udev_joypad.c](https://github.com/libretro/RetroArch/blob/master/input/drivers_joypad/udev_joypad.c).
19+
- The `linuxraw` driver rely on the Device Index (input_device).
2020

2121
### Difference in input variable generation between linuxraw and udev.
2222

@@ -342,7 +342,7 @@ When developing controller configurations, it's essential to anticipate and miti
342342
Here's how to set up a default-off configuration:
343343

344344
1. Append "(default-off)" to the configuration filename.
345-
2. Comment out the `input_vendor_id` and `input_product_id` lines in the config file.
345+
2. Comment out the `input_device`, `input_vendor_id` and `input_product_id` lines in the config file.
346346
3. Do not add "(default-off)" to the values of the input_device_display_name and input_driver variables in the config file. The default-off status is already indicated by the filename, so these variables should remain unmodified for clarity.
347347

348348
This approach allows users to manually enable the configuration when needed, preventing automatic application that could interfere with common devices, and helps ensure a smoother experience for users while still providing the necessary configuration options for those who require them.
@@ -402,6 +402,8 @@ In the above list, five **Autoconfigs file names to generate** entries are ident
402402
```
403403
#input_device = "Nintendo Co., Ltd. Pro Controller"
404404
input_device_display_name = "Nintendo Switch Pro Controller (non-HID) (USB)"
405+
#input_vendor_id = "1406"
406+
#input_product_id = "8201"
405407
```
406408

407409
Note: `(default-off)` is added to the filename , and `input_device` variable is commented out to disable this auto-configuration, preventing file name duplication and conflicts with the HID version: Nintendo Co., Ltd. Pro Controller.cfg
@@ -410,9 +412,11 @@ Note: `(default-off)` is added to the filename , and `input_device` variable is
410412
```
411413
#input_device = "Pro Controller"
412414
input_device_display_name = "Nintendo Switch Pro Controller (non-HID) (Bluetooth)"
415+
#input_vendor_id = "1406"
416+
#input_product_id = "8201"
413417
```
414418

415-
Note: `(default-off)` is added to the filename , and `input_device` variable is commented out to disable this auto-configuration, preventing file name duplication and conflicts with the HID version: Pro Controller.cfg
419+
Note: `(default-off)` is added to the filename , and the `input_device`, `input_vendor_id` and `input_product_id` variables are commented out to disable this auto-configuration, preventing file name duplication and conflicts with the HID version: Pro Controller.cfg
416420

417421
- **Nintendo Switch Pro Controller.cfg**:
418422
```

0 commit comments

Comments
 (0)