Xbox gamepads on Mac sometimes not recognized |
|
Issue descriptionAround 10% of the time, plugging in an Xbox gamepad results in no gamepadconnected event and no new Gamepad object in navigator.getGamepads(). Chrome Version: Chrome 64 OS: OSX 10.13.2 What steps will reproduce the problem? (1) Open html5gamepad.com (2) Connect an Xbox 360 wired gamepad What is the expected result? The gamepad ID is displayed on the page. What happens instead? No gamepad is displayed.
,
Feb 15 2018
I've noticed USBDeviceOpen failing with exclusive access errors in two general cases: * When the device is first connected, trying to open it may fail. Usually, retrying after a short delay will succeed. * If another instance of Chrome is running, the device may not be opened until the other instance is closed. If both instances are running when the device is connected, only one will be able to open the device. Re-plugging the device can change which instance opens the device. I'm not sure which process is opening the device in the first case, but we can register for interest notifications to be notified when the device is available. The second case is caused by exclusive access to the USB device. If one Chrome process opens the device the other must wait until the handle is closed. Unfortunately this is a limitation of IOUSBLib and is probably not fixable within Chrome. As a workaround, users can install a third-party driver (e.g., 360Controller) that allows XInput devices to function as standard HID gamepads.
,
Mar 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3e906dc4e4dcc331e10451069d785d7f13642425 commit 3e906dc4e4dcc331e10451069d785d7f13642425 Author: Matt Reynolds <mattreynolds@google.com> Date: Tue Mar 13 19:47:47 2018 [Mac] Retry USBDeviceOpen on exclusive access error On OSX, opening a device with USBDeviceOpen may fail with kIOReturnExclusiveAccess if the device has already been opened by another process. This CL checks for the exclusive access error and waits for a signal from the OS that the device is available. BUG=811480 Change-Id: I8ed3cd25e52e80ca1d6086e151a63b9df0e99e0c Reviewed-on: https://chromium-review.googlesource.com/915018 Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#542886} [modify] https://crrev.com/3e906dc4e4dcc331e10451069d785d7f13642425/device/gamepad/xbox_controller_mac.h [modify] https://crrev.com/3e906dc4e4dcc331e10451069d785d7f13642425/device/gamepad/xbox_controller_mac.mm [modify] https://crrev.com/3e906dc4e4dcc331e10451069d785d7f13642425/device/gamepad/xbox_data_fetcher_mac.cc [modify] https://crrev.com/3e906dc4e4dcc331e10451069d785d7f13642425/device/gamepad/xbox_data_fetcher_mac.h |
|
►
Sign in to add a comment |
|
Comment 1 by mattreynolds@chromium.org
, Feb 12 2018