diff options
Diffstat (limited to 'docs/source/advanced/ctrlr_config.rst')
-rw-r--r-- | docs/source/advanced/ctrlr_config.rst | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/source/advanced/ctrlr_config.rst b/docs/source/advanced/ctrlr_config.rst index 6fdeddc8a8a..9e284f7f945 100644 --- a/docs/source/advanced/ctrlr_config.rst +++ b/docs/source/advanced/ctrlr_config.rst @@ -228,3 +228,34 @@ Here’s an example that overrides defaults for 280-ZZZAP: This sets the controls to steer left and right to the K and J keys, respectively, and disables the toggle setting for the gear shift input. + + +.. _ctrlrcfg-mapdevice: + +Assigning input device numbers +------------------------------ + +Use ``mapdevice`` elements with ``device`` and ``controller`` attributes to +assign stable numbers to input devices. Note that all devices explicitly +configured in this way must be connected when MAME starts for this to work as +expected. + +Set the ``device`` attribute to the device ID of the input device, and set the +``controller`` attribute to the desired input device token (device type and +number). + +Here’s an example numbering two light guns and two XInput game controllers: + +.. code-block:: XML + + <system name="default"> + <input> + <mapdevice device="VID_D209&PID_1601" controller="GUNCODE_1" /> + <mapdevice device="VID_D209&PID_1602" controller="GUNCODE_2" /> + <mapdevice device="XInput Player 1" controller="JOYCODE_1" /> + <mapdevice device="XInput Player 2" controller="JOYCODE_2" /> + </input> + </system> + +MAME applies ``mapdevice`` elements found inside any applicable ``system`` +element. |