diff options
author | 2023-01-14 03:07:57 +1100 | |
---|---|---|
committer | 2023-01-14 03:13:59 +1100 | |
commit | bf2707f4c76abaeaeda2d9c4444a608d7d0afed5 (patch) | |
tree | 992e3090717dd4c36922b80615d8680588183384 /src/osd/modules/input/input_xinput.cpp | |
parent | e817a3d0c8e7697b55ce75c8e0939328022f5ecc (diff) |
osd: Added support for mapping files to sdlgame joystick provider and made it default with SDL.
This changes behaviour, however I think it's a net positive:
* Most games using Steam Input or SDL2 to read game controllers have
this behaviour, so users have come to expect it.
* This module is better at giving meaningful names to buttons on
common controller, and assigning axes consistently.
* Button/axis mapping files using a widely-used format are supported.
* The old behaviour is still available with `-joystickprovider sdljoy`
if anyone wants it.
The new option for controller mapping files is in the general OSD
options rather than SDL options as it can be extended to DirectInput in
the future.
Diffstat (limited to 'src/osd/modules/input/input_xinput.cpp')
-rw-r--r-- | src/osd/modules/input/input_xinput.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/osd/modules/input/input_xinput.cpp b/src/osd/modules/input/input_xinput.cpp index fda2b9d8b23..970c8e65c0e 100644 --- a/src/osd/modules/input/input_xinput.cpp +++ b/src/osd/modules/input/input_xinput.cpp @@ -44,6 +44,19 @@ RSB Button Button^ Button^ Button^ ^ optional +At least the vast majority of controllers report 8-bit trigger +resolution and 10-bit stick resolution, even when the physical controls +use digital switches. Resolution can't be used to reliably detect +nominal analog axes controlled by switches. + +Some arcade sticks report unknown or gamepad subtype, but have a single +digital joystick with a switch to select between controlling the D-pad, +left stick and right stick. You can't assume that all three can be +controlled at the same time. + +Many controllers don't correctly report the absence of analog sticks. + + There are multiple physical button layouts for arcade sticks, for example: @@ -68,17 +81,26 @@ Hori Real Arcade Pro VX-SA Kai, Razer Atrox B X Y LB A LT RT RB -Hori Real Arcade Pro.V Kai, Mayflash F300, Mayflash F500 +Hori Real Arcade Pro.V Kai, Mad Catz EGO Arcade Stick, Mayflash F300, Mayflash F500 X Y RB LB A B RT LT -Mad Catz Brawl Stick +Mad Catz WWE All Stars Brawl Stick X Y LB LT A B RB RT Arcade pads typically have six face buttons, and come with different layouts corresponding to the latter two arcade stick layouts, with the -rightmost column on the shoulder buttons. +rightmost column on the shoulder buttons. Examples of face button +layouts: + +Mad Catz Street Fighter IV FightPad, PowerA FUSION Wired FightPad +X Y RB +A B RT + +Hori Pad EX Turbo 2, Mad Catz WWE All Stars BrawlPad, Mortal Kombat X Fight Pad, PDP Versus Fighting Pad +X Y LB +A B RB Dance mats usually have this layout: |