mamedev / mame

MAME
https://www.mamedev.org/
Other
8k stars 1.99k forks source link

Allow input modules to supply default assignments considering connected peripherals #10820

Open cuavas opened 1 year ago

cuavas commented 1 year ago

The problem is that analog axes on game controllers are a complete mess:

There’s no sensible set of defaults that suits even just these three kinds of controllers. The input provider modules need to be able to use heuristics to supply defaults depending on the connected devices.

Just calling through to input provider modules when the OSD interface object customises the input list won’t work properly, because input device numbers get remapped when the controller configuration file is loaded. It has to happen after input device numbers are remapped, but before defaults from the controller configuration file are applied.

cuavas commented 1 year ago

d4589e0b29d6085072ff635d87c3d95c21813a58 implements most of this. Mappings for flight and driving controls are based on assumptions for the most part as most MAME users seem to have traditional game controllers and rhythm/music game peripherals. XInput driving controls will probably have bad default assignments, I haven’t thought them through properly.