New issue
Advanced search Search tips

Issue 921685 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Support more third-party XInput devices on Linux

Project Member Reported by mattreyn...@google.com, Jan 14

Issue description

On Linux, we rely on the input subsystem to identify when gamepads are connected. The input subsystem uses the xpad kernel driver to identify and communicate with XInput devices (Xbox, Xbox 360, and Xbox One controllers), including a large number of third-party gamepads.

https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c#L128

Chrome is already aware of most of these third-party gamepads, but only includes mappings for official Xbox 360 and Xbox One devices. When an unsupported device is connected, Chrome makes it usable but the button and axis values are mapped incorrectly. (Buttons/axes out of order; triggers mapped as axes).

Third-party XInput gamepads use the same XInput reports as genuine devices, so we should be able to apply the same button and axis mapping function already used for genuine Xbox devices to expose third-party button/axis state.

The gamepad id list already contains information about which devices are known to be Xbox 360/Xbox One compatible:

https://cs.chromium.org/chromium/src/device/gamepad/gamepad_id_list.cc?l=25
 

Sign in to add a comment