You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/controller-autoconfiguration.md
+27-11Lines changed: 27 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -158,28 +158,44 @@ Here's how to set up a default-off configuration:
158
158
159
159
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.
160
160
161
-
### Controller name scheme
161
+
### Device Index scheme for autoconfig files
162
162
163
-
In RetroArch, the management of controller configurations is essential for ensuring proper functionality across various systems. This guide outlines how controller names are generated and how they can vary based on the Linux kernel version in GNU/Linux distributions.
163
+
In RetroArch, the management of controller configurations is essential for ensuring proper functionality across various systems. This guide outlines how the Device Index are generated and how they can vary based on the Linux kernel version in GNU/Linux distributions.
164
164
165
-
#### Understanding controller names
165
+
#### Understanding the Device Index
166
166
167
-
When you save a controller profile (**Settings > Input > RetroPad Binds > Port 1 Controls > Save Controller Profile**), RetroArch generates a controller name (e.g., "Foo"). This name serves two purposes:
167
+
RetroArch identifies physical controllers through a system called the Device Index. You can locate this identifier by navigating to:
168
168
169
-
1. It becomes part of the configuration file name (e.g., "udev/Foo.cfg").
170
-
2. It's used as the value for the `input_device` variable within the configuration file (e.g., `input_device = "Foo"`).
The Device Index plays a crucial role when saving a controller profile. To save a profile, follow this path:
172
+
173
+
**Settings > Input > RetroPad Binds > Port 1 Controls > Save Controller Profile**
174
+
175
+
176
+
### Dual function of the Device Index
177
+
178
+
When you save a controller profile, the Device Index serves two important purposes:
179
+
180
+
1.**Configuration File Naming**: It becomes an integral part of the configuration file's name. For example, if the Device Index is "Foo", the configuration file might be named "udev/Foo.cfg".
181
+
182
+
2.**Input Device Identification**: Within the configuration file itself, the Device Index is used as the value for the `input_device` variable. Following our example, you would see a line like this in the file:
183
+
184
+
`input_device = "Foo"`
185
+
186
+
This dual functionality ensures that RetroArch can correctly identify and apply the appropriate settings for each unique controller.
171
187
172
188
Importantly, this name remains consistent across various controller drivers, such as udev, sdl2, and linuxraw, as specified in **Settings > Drivers > Controller**.
173
189
174
-
#### Variability of controller names
190
+
#### Variability of the Device Index
175
191
176
-
The controller name may change depending on the version of the system, particularly the Linux kernel version. To ensure compatibility, we utilize the most recent controller name that is supported by the system.
192
+
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.
177
193
178
194
#### Example: Nintendo Switch Pro Controller on GNU/Linux
179
195
180
-
The following table illustrates how the controller name 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
196
+
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
181
197
182
-
| Linux Kernel Version |Controller Name in RetroArch | Nintendo Switch Pro Controller HID Support | Selected controller name for the autoconfiguration file |
198
+
| Linux Kernel Version |Device Index in RetroArch | Nintendo Switch Pro Controller HID Support | Selected Device Index for the autoconfiguration file |
@@ -190,7 +206,7 @@ The following table illustrates how the controller name for the Nintendo Switch
190
206
191
207
###### Pro Controller (default-off).cfg
192
208
```
193
-
# This file uses the legacy controller name "Pro Controller" (generated by RetroArch on Linux 5.15)
209
+
# This file uses the legacy Device Index "Pro Controller" (generated by RetroArch on Linux 5.15)
194
210
# "(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.
195
211
input_device = "Pro Controller"
196
212
# 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:
0 commit comments