New issue
Advanced search Search tips

Issue 911826 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Task



Sign in to add a comment

Refactor HID gamepad data fetchers to use HID backend

Project Member Reported by mattreynolds@chromium.org, Dec 4

Issue description

Chrome has a cross-platform HID backend for use with the chrome.hid extension API, but our gamepad data fetchers are using platform APIs to fetch gamepad state. We should switch to using the HID backend so we can remove the unnecessary platform-specific HID logic.

Affected classes:

GamepadDeviceMac
GamepadPlatformDataFetcherMac
Dualshock4ControllerBase
SwitchProControllerBase
HidHapticGamepadBase

On Windows we are essentially using RawInput as a way to read data from HID devices, so we should consider porting the RawInputDataFetcher to the HID backend as well:

RawInputDataFetcherWin
RawInputGamepadDeviceWin

It may also make sense to use the USB backend for data fetchers that communicate with XInput USB devices. (These are not HID devices and cannot be used through the HID backend.)

XboxControllerMac
XboxDataFetcherMac
 

Sign in to add a comment