summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-08-03 22:37:45 +0200
committerYuri Sizov <yuris@humnom.net>2023-08-03 22:37:45 +0200
commit1610fc2ae78776fbeed8f5eb16781e66c372f051 (patch)
tree1b8994813534e8564c71500d1b178cbafeac2c86 /doc
parente4b8dc81b8d06d2e263b9865017c48fe5d98c287 (diff)
parent3aa340d0814ab001075f707d8c1bf1f77e22a561 (diff)
downloadredot-engine-1610fc2ae78776fbeed8f5eb16781e66c372f051.tar.gz
Merge pull request #78539 from EIREXE/input-info
Add the ability to get per-platform information for joypads
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Input.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index c2a20827d2..6d907bbb28 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -121,6 +121,20 @@
Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. [code]030000004c050000c405000000010000[/code]. Returns [code]"Default Gamepad"[/code] otherwise. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL2 game controller database[/url] to determine gamepad names and mappings based on this GUID.
</description>
</method>
+ <method name="get_joy_info" qualifiers="const">
+ <return type="Dictionary" />
+ <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.
+ 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.
+ [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.
+ </description>
+ </method>
<method name="get_joy_name">
<return type="String" />
<param index="0" name="device" type="int" />