Allow Chrome on Mac to recognize multiple MFi gamepads
Chrome for Mac recognizes "Made for iOS" (MFi) gamepads enumerated by the GameController framework. When multiple such devices are connected at once, Chrome fails to properly distinguish them. GCController exposes a playerIndex field that defaults to the value GCControllerPlayerIndexUnset (-1). The application may set this field to a value between 0 and 3 to signal which LEDs should be lit on the gamepad. Chrome also uses this field to distinguish gamepads, but does not set the index to a unique value. This causes the first-connected gamepad to shadow any other connected gamepads. This CL ensures each connected MFi gamepad is assigned a unique player index up to the OS-defined limit of four. BUG=775270 Change-Id: Iaf038a910df8dc7eb2cee99d4d671a6c9ff6dba0 Reviewed-on: https://chromium-review.googlesource.com/724233 Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Reviewed-by:Brandon Jones <bajones@chromium.org> Cr-Commit-Position: refs/heads/master@{#509612}
Showing
Please register or sign in to comment