New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 716158 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Gamepad guide button not mapped for some gamepads on Windows

Project Member Reported by mattreynolds@chromium.org, Apr 27 2017

Issue description

Chrome Version: 57.0.2987.133
OS: Windows

What steps will reproduce the problem?

0. Open Chrome and navigate to http://html5gamepad.com.
1. Connect a gamepad with a "Guide" button (e.g., Xbox button on MS gamepads, Playstation button on Sony gamepads)
2. Press the Guide button

What is the expected result?

Pressing the button should activate B16.

What happens instead?

B16 is not mapped in Chrome, pressing it has varying effects depending on the gamepad drivers and other installed software (eg, Steam).
 
Note that in the case of the Xbox Button on Windows this is intentional on the part of Microsoft. XInput does not expose that button so it could be reserved for Windows-specific uses. We CAN access it, (asn we do on Mac, for example) but doing so would require writing an entirely new path for those devices which manually parses out their proprietary HID packets. I don't think that's worth it.
Components: -IO>Gamepad Blink>GamepadAPI
I've run into this problem with Xbox 360 Controller (XInput STANDARD GAMEPAD). Pressing the guide button does update the timestamp, but it doesn't show up in the buttons list.
XInputGetState doesn't expose the Guide button, but it is possible to get it without parsing proprietary packet formats. There's an undocumented XInputGetStateEx function (ordinal 100) that includes the reserved button. This should work for all XInput gamepads.
Owner: mattreynolds@chromium.org
Status: Started (was: Available)
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 18 2017

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

commit 49074422f4e0836b618956d053927790f011916e
Author: Matt Reynolds <mattreynolds@chromium.org>
Date: Mon Dec 18 20:39:08 2017

Support Guide button for XInput gamepads on Windows

XInput treats the Guide button as an OS-reserved button and does not
expose its state in the normal XInputGetState method. To access this
button, we will use the undocumented XInputGetStateEx method when it
is available.

BUG=716158

Change-Id: I5ab4bc65bae3badca59f65d360ee006587cdf106
Reviewed-on: https://chromium-review.googlesource.com/830664
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524787}
[modify] https://crrev.com/49074422f4e0836b618956d053927790f011916e/device/gamepad/gamepad_platform_data_fetcher_win.cc
[modify] https://crrev.com/49074422f4e0836b618956d053927790f011916e/device/gamepad/gamepad_platform_data_fetcher_win.h

The above change adds support for the Guide button on XInput gamepads in Chrome for Windows, but the user must make a configuration change in Windows to prevent it from capturing the button before Chrome gets a chance to handle it.

To disable Game Bar in Windows:

1. Press Win+G to open the Game Bar
2. If prompted, check "Yes, this is a game"
3. Click the Settings icon
4. Uncheck "Open Game bar using (Xbox button) on a controller"
5. Optionally uncheck "Remember this as a game", or just close the settings window.
Labels: Needs-Feedback
Tested the issue on Windows 10 using Chrome version M65 - 65.0.3299.0 as per the issue mentioned in original comment using Sony Playstation Gamepad. 

Observed that issue is working as intended using Sony Playstation Gamepad, upon pressing the Home button on Gamepad, "B16" button gets blinked on the website: http://html5gamepad.com/. Attached the screencast for reference.

@mattreynolds -- Will testing on Sony Playstation be enough or it requires testing on Xbox as well.

Thank you!
716158.webm
895 KB View Download

Sign in to add a comment