[gamepad] Block double-enumerated gamepads on Mac
In macOS 10.15, Game Controller API added support for Xbox Wireless Controller and Dualshock 4. In Chrome, these devices are already supported through XboxDataFetcher and GamepadPlatformDataFetcherMac. When GameControllerDataFetcherMac also enumerates them, a duplicate gamepad is added to the gamepad list. To prevent this, GameControllerDataFetcherMac will skip these devices during enumeration. 10.15 added a new productCategory property to GCController which allows applications to detect these newly-supported devices. This CL uses productCategory when available, and compares the device's vendorName against known values when it is not. BUG=971801 Change-Id: Ie937f341d1f3c3c1c3a81d6717da2f15d6f6b993 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773708Reviewed-by:Avi Drissman <avi@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#691900}
Showing
Please register or sign in to comment