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
+51-52Lines changed: 51 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,48 @@
1
1
# Joypad Auto Configuration
2
2
3
+
## Why is it needed?
4
+
5
+
RetroArch runs on many platforms. Each of these platforms has one or more input systems. These input systems in turn differ widely in the way they enumerate the pad buttons. For this reason, your joypad buttons may be mapped differently depending on if you are using Windows, Mac, or Linux.
6
+
7
+
8
+
Traditional emulators allow you map each button of your pad to the original pad of the emulated system. For example, this is how the Snes9x joypad configuration interface looks:
RetroArch also allows this kind of manual mapping. However, RetroArch tries to go further by detecting your joypad and automatically configuring it so manual configuration becomes obsolete.
13
+
14
+
## Benefits
15
+
16
+
With RetroArch joypad auto-configuration system, your joypad will be recognized and will work out of the box.
17
+
18
+
This allows:
19
+
20
+
- Use many different joypads and have them attributed to each players like it would work on a real game console.
21
+
- Unplug the second joypad, and replace it by another one, even if it's of a different brand and model.
22
+
23
+
Having automatically configured joypads makes it a lot easier to navigate the RetroArch Menu with the joypad. This is very convenient when running RetroArch on a game console, where a keyboard and a mouse are not always available. It is also what makes RetroArch suitable to build your own game console using Lakka or a similar OS.
The set of joypad profiles used by RetroArch can be downloaded and updated from the menu. Go to `Main Menu` -> `Online Updater` -> `Update Controller Profiles` to get the latest version of the profile pack.
30
+
31
+
A message will appear at the bottom of the screen showing the download progress and the extraction of the archive.
32
+
33
+
## Generating a joypad profile
34
+
35
+
If your joypad is not recognized by RetroArch even after updating the profiles, you can generate a profile from the menu.
36
+
37
+
1. To avoid other controllers from interfering with your mapping when starting RetroArch, follow these steps: Disconnect all joypads by unplugging their cables or disconnecting them from any wireless connections.
38
+
2. Connect the controller intended for autoconfiguration. Ensure your system supports the selected connectivity method. If your joypad supports both wired and wireless connections and the initial attempt (e.g., via USB) fails, try the alternative option (e.g., Bluetooth). For example, the Nintendo Switch Pro Controller does not support USB connection on Linux 5.15 and older but does support Bluetooth.
39
+
3. For Android, run the [Android](#android) steps first.
40
+
4. Use `Settings` -> `Input` -> `RetroPad Binds` -> `Port 1 Controls` -> `Set All Controls`. If automatic mapping fails for any button (e.g., due to lack of driver support), the process will be interrupted. In case of interruption, manually map the remaining buttons, starting from the one that caused the interruption and continuing through the rest of the list.
6. The new profile file (also known as the autoconfig file) will be saved to your disk: [Controller profile directory]/[Controller driver]/[Device index].cfg.
43
+
7. Proceed with the manual configuration step section below.
44
+
45
+
3
46
## How does RetroArch match controllers?
4
47
5
48
When you connect a new controller to RetroArch, the system attempts to automatically configure it by matching it to known profiles. This matching process is crucial for ensuring that your controller works correctly with various games and emulators.
@@ -10,6 +53,14 @@ The matching algorithm considers several key factors:
10
53
-**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**.
11
54
-**Vendor ID (input_vendor_id)**: A unique identifier assigned to the controller's manufacturer.
12
55
-**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.
57
+
58
+
### Matching process
59
+
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.
60
+
61
+
The combination of Vendor ID and Product ID is often referred to as "vid:pid" in technical contexts.
62
+
63
+
This automated matching system allows RetroArch to support a vast array of controllers, reducing the need for manual setup in most situations.
13
64
14
65
## Autoconfig variable policy
15
66
@@ -116,36 +167,6 @@ input_r_y_plus_axis = "+3"
116
167
input_r_y_minus_axis = "-3"
117
168
```
118
169
119
-
### Matching process
120
-
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.
121
-
122
-
The combination of Vendor ID and Product ID is often referred to as "vid:pid" in technical contexts.
123
-
124
-
This automated matching system allows RetroArch to support a vast array of controllers, reducing the need for manual setup in most situations.
125
-
126
-
127
-
## Why is it needed?
128
-
129
-
RetroArch works many platforms. Each of these platforms has one or more input systems. These input systems in turn differ widely in the way they enumerate the pad buttons. For this reason, your joypad buttons may be mapped differently depending on if you are using Windows, Mac, or Linux.
130
-
131
-
132
-
Traditional emulators allow you map each button of your pad to the original pad of the emulated system. For example, this is how the Snes9x joypad configuration interface looks:
RetroArch also allows this kind of manual mapping. However, RetroArch tries to go further by detecting your joypad and automatically configuring it so manual configuration becomes obsolete.
137
-
138
-
## Benefits
139
-
140
-
With RetroArch joypad auto-configuration system, your joypad will be recognized and will work out of the box.
141
-
142
-
This allows:
143
-
144
-
- Use many different joypads and have them attributed to each players like it would work on a real game console.
145
-
- Unplug the second joypad, and replace it by another one, even if it's of a different brand and model.
146
-
147
-
Having automatically configured joypads makes it a lot easier to navigate the RetroArch Menu with the joypad. This is very convenient when running RetroArch on a game console, where a keyboard and a mouse are not always available. It is also what makes RetroArch suitable to build your own game console using Lakka or a similar OS.
148
-
149
170
## Before you begin
150
171
151
172
Make sure that you run the latest version of RetroArch, to generate a file name and file content via `Settings` -> `Input` -> `RetroPad Binds` -> `Port 1 Controls` -> `Save Controller Profile` that is up to date with our current policies.
@@ -257,26 +278,6 @@ Note: The actual path of the default directory is: /var/lib/flatpak/app/org.libr
257
278
258
279
By implementing these changes, you'll be able to create and save custom controller profiles without requiring root privileges.
The set of joypad profiles used by RetroArch can be downloaded and updated from the menu. Go to `Main Menu` -> `Online Updater` -> `Update Controller Profiles` to get the latest version of the profile pack.
265
-
266
-
A message will appear at the bottom of the screen showing the download progress and the extraction of the archive.
267
-
268
-
## Generating a joypad profile
269
-
270
-
If your joypad is not recognized by RetroArch even after updating the profiles, you can generate a profile from the menu.
271
-
272
-
1. To avoid other controllers from interfering with your mapping when starting RetroArch, follow these steps: Disconnect all joypads by unplugging their cables or disconnecting them from any wireless connections.
273
-
2. Connect the controller intended for autoconfiguration. Ensure your system supports the selected connectivity method. If your joypad supports both wired and wireless connections and the initial attempt (e.g., via USB) fails, try the alternative option (e.g., Bluetooth). For example, the Nintendo Switch Pro Controller does not support USB connection on Linux 5.15 and older but does support Bluetooth.
274
-
3. For Android, run the [Android](#android) steps first.
275
-
4. Use `Settings` -> `Input` -> `RetroPad Binds` -> `Port 1 Controls` -> `Set All Controls`. If automatic mapping fails for any button (e.g., due to lack of driver support), the process will be interrupted. In case of interruption, manually map the remaining buttons, starting from the one that caused the interruption and continuing through the rest of the list.
6. The new profile file (also known as the autoconfig file) will be saved to your disk: [Controller profile directory]/[Controller driver]/[Device index].cfg.
278
-
7. Proceed with the manual configuration step section below.
279
-
280
281
### Additional manual configuration steps
281
282
282
283
#### Add hotkey(s)
@@ -378,8 +379,6 @@ When modifying your autoconfig file for analog triggers, it's crucial to pay att
378
379
Users often unintentionally incorporate analog variable values without properly adjusting the existing variable names to reflect their analog nature. This oversight frequently results in configuration problems within the system.
379
380
By carefully updating both the variable names and values, you can ensure that your analog triggers are correctly configured for optimal performance.
380
381
381
-
###
382
-
383
382
### Inspect the file
384
383
385
384
Without modifying anything in the original file, open it in the file in a text editor and
0 commit comments