Fix Input.get_joy_info() regression

SDL input driver did not have the "xinput_index", "raw_name", "vendor_id" and "product_id" fields for this method and exposed an additional, essentially useless for the users "mapping_handled" field. This commit fixes these issues.
This commit is contained in:
Nintorch
2025-08-29 14:22:56 +05:00
parent efb40c1524
commit f28acf97d0
3 changed files with 25 additions and 10 deletions

View File

@@ -130,16 +130,14 @@
<param index="0" name="device" type="int" />
<description>
Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index.
On Windows, the dictionary contains the following fields:
[code]xinput_index[/code]: The index of the controller in the XInput system. Undefined for DirectInput devices.
[code]vendor_id[/code]: The USB vendor ID of the device.
[code]product_id[/code]: The USB product ID of the device.
On Linux:
[code]raw_name[/code]: The name of the controller as it came from the OS, before getting renamed by the godot controller database.
On Windows, Linux, and macOS, the dictionary contains the following fields:
[code]raw_name[/code]: The name of the controller as it came from the OS, before getting renamed by the controller database.
[code]vendor_id[/code]: The USB vendor ID of the device.
[code]product_id[/code]: The USB product ID of the device.
[code]steam_input_index[/code]: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present.
[b]Note:[/b] The returned dictionary is always empty on Web, iOS, Android, and macOS.
On Windows, the dictionary can have an additional field:
[code]xinput_index[/code]: The index of the controller in the XInput system. This key won't be present for devices not handled by XInput.
[b]Note:[/b] The returned dictionary is always empty on Android, iOS, visionOS, and Web.
</description>
</method>
<method name="get_joy_name">