Mac: Nvidia Shield controller HID descriptor is parsed incorrectly
Reported by
aicomman...@gmail.com,
Apr 28 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36 Steps to reproduce the problem: 1. Connect the Shield controller via USB to a Mac 2. Go to http://html5gamepad.com/ 3. Test buttons, sticks, and triggers What is the expected behavior? Most buttons and axes should at least appear in the gamepad output somewhere. The Windows mapping for the Shield controller has all buttons working except the select button. Mac should match this level of functionality. What went wrong? None of the sticks, triggers, or d-pad buttons work at all. Only the L2, L3, R2, R3, and the X button work. Did this work before? No Chrome version: 52.0.2718.0 Channel: canary OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 21.0 r0 This issue is caused by the fact that IOHIDDeviceCopyMatchingElements() in gamepad_platform_data_fetcher_mac.mm doesn't exclude HID elements that aren't within our desired application containers. The Shield controller contains several top-level HID application containers. Because the code in the data fetcher parses elements without regard for their container's usage, this causes the available space in the WebGamepad object to be rapidly exhausted. Once we finally get to the HID elements we want, the indices for buttons and axes are already filled.
,
Apr 28 2016
,
Apr 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d908daba0f7dc5ae548a6c7e4719ec004f4bf10e commit d908daba0f7dc5ae548a6c7e4719ec004f4bf10e Author: aicommander <aicommander@gmail.com> Date: Thu Apr 28 17:52:47 2016 Ignore HID elements in extraneous application collections on OSX Even though we only ask HID manager for devices that have relevant usage numbers, matching devices may have elements that aren't in the collections that we care about. These irrelevant elements take up valuable slots in the WebGamepad object and crowd out the elements that we actually want. The Nvidia Shield controller falls victim to these extra elements, which prevent most of the gamepad controls from being usable at all. BUG= 607401 TEST=HTML5 Gamepad API test with Nvidia Shield controller Review-Url: https://codereview.chromium.org/1925953002 Cr-Commit-Position: refs/heads/master@{#390420} [modify] https://crrev.com/d908daba0f7dc5ae548a6c7e4719ec004f4bf10e/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h [modify] https://crrev.com/d908daba0f7dc5ae548a6c7e4719ec004f4bf10e/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
,
Apr 28 2016
Thanks for the CL!
,
Apr 27 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by aicomman...@gmail.com
, Apr 28 2016