New issue
Advanced search Search tips

Issue 775268 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

SteelSeries Nimbus gamepad occupies multiple slots on Mac

Project Member Reported by mattreynolds@chromium.org, Oct 16 2017

Issue description

Chrome Version: 61.0.3163.100 (Official Build) (64-bit)
OS: OS X 10.12.6

What steps will reproduce the problem?
(0) Connect a "Made For iOS" (MFi) gamepad to a Mac
(1) Go to html5gamepad.com in Chrome
(2) Press a button on the gamepad

What is the expected result?

The MFi gamepad should appear once

What happens instead?

It appears twice with different ID strings:

Nimbus (Vendor: 1038 Product: 1420) <-- this entry has a "[none]" mapping and only shows axis changes

Nimbus (STANDARD GAMEPAD) <-- this entry has a "standard" mapping and all buttons/axes work as expected

It looks like the first entry comes from GamepadPlatformDataFetcherMac and the second from GameControllerDataFetcherMac. We should blacklist known MFi devices from being detected by GamepadPlatformDataFetcherMac.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35f6d48ddeba543ffdd46fe0c91d6c0b358e8bbf

commit 35f6d48ddeba543ffdd46fe0c91d6c0b358e8bbf
Author: Matt Reynolds <mattreynolds@google.com>
Date: Tue Oct 17 19:00:29 2017

Blacklist SteelSeries Nimbus in platform data fetcher

The SteelSeries Nimbus is a Made For iOS (MFi) gamepad. In Chrome for
Mac, MFi gamepads are enumerated through the GameController framework.
The Nimbus is also detected as a generic USB HID device, which are
enumerated by GamepadPlatformDataFetcherMac. To prevent the gamepad
from being enumerated by both data fetchers and taking an extra gamepad
slot, the vendor/product ID pair for the Nimbus is blacklisted in the
platform data fetcher.

BUG= 775268 

Change-Id: Idf8510663ab15b0c11c1b0dd712f3889383e6894
Reviewed-on: https://chromium-review.googlesource.com/722522
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509470}
[modify] https://crrev.com/35f6d48ddeba543ffdd46fe0c91d6c0b358e8bbf/device/gamepad/gamepad_platform_data_fetcher_mac.mm

Status: Fixed (was: Available)
Summary: SteelSeries Nimbus gamepad occupies multiple slots on Mac (was: "Made For iOS" gamepad occupies multiple gamepad slots)
Owner: mattreynolds@chromium.org
Status: Started (was: Fixed)
There's a bug with this fix... and also a second bug that causes a DCHECK failure when a blacklisted device is removed.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c7db69ffac500cc280bda9f136bbf581df36eb5

commit 3c7db69ffac500cc280bda9f136bbf581df36eb5
Author: Matt Reynolds <mattreynolds@google.com>
Date: Wed Nov 29 19:16:11 2017

Fix DCHECK failure when disconnecting MFi gamepad

When a MFi gamepad is disconnected, we find the slot it was assigned and
clear out its associated data. There is a DCHECK in DeviceRemove that
asserts the associated data was found before clearing it. However, if the
gamepad was not assigned a slot (for instance, because there were no slots
available when the gamepad was connected, or because it the gamepad is
blacklisted from enumeration) then the DCHECK fails. Instead, it should
ignore the removed device if no associated data was found.

This CL also fixes a bug where a slot is still assigned for blacklisted
devices. To correct this, the blacklist check is moved above where the
slot is assigned.

BUG= 775268 

Change-Id: I65659bc0bf9e9568ea428242ed14604cb7fddb3d
Reviewed-on: https://chromium-review.googlesource.com/754083
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520187}
[modify] https://crrev.com/3c7db69ffac500cc280bda9f136bbf581df36eb5/device/gamepad/gamepad_platform_data_fetcher_mac.mm

Status: Fixed (was: Started)

Sign in to add a comment