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

Issue 600230 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Gamepad API is outputting strange values for buttons

Reported by chrismr3...@gmail.com, Apr 4 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36

Steps to reproduce the problem:
1. Connect a logitech Driving Force GT
2. Press X button and D-Pad buttons

What is the expected behavior?
The Dpad buttons to each be their own button and the X Button to not be magically pressed when it isn't

What went wrong?
The X button appears as pressed and the DPad for some reason appears as a Frankenstein-ed sort of axis.

Did this work before? N/A 

Chrome version: 49.0.2623.110  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 21.0 r0

Admittedly it's a fairly niche thing to have a driving wheel connected and have it's output read in chrome, but what bothers me the most is how Firefox somehow has this set up correctly and chrome does not (as can be seen at http://chrisr.xyz/s/2016-04-04_00-48-42.mp4 ).
 
I have a repro with my Logitech Dual Action controller. The X button is stuck down in Chrome on Windows but not on OS X.

I have a CL that will address the stuck button that I'll upload soon. The d-pad issue is simply a missing gamepad mapping issue.
Cc: scottmg@chromium.org bajones@chromium.org rnimmagadda@chromium.org
 Issue 393164  has been merged into this issue.
Thanks for the heads up. Much appreciated.
Project Member

Comment 4 by bugdroid1@chromium.org, May 4 2016

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

commit a8d9d22865f445b8f6f2b9814fb919b8008fbc5c
Author: aicommander <aicommander@gmail.com>
Date: Wed May 04 20:08:27 2016

Fix button 1 being stuck down on certain Logitech gamepads on Windows

There are HID elements in these gamepads classified as buttons which
don't use the usage page value for buttons. These elements don't actually
correspond to real buttons on the controller, and are stuck in the pressed
position. On OSX, we skip these "fake" buttons, but we didn't on Windows.
As a result, a HID element would overlap with button 1 and make it appear
to be constantly pressed.

R=bajones@chromium.org

BUG= 600230 

Review-Url: https://codereview.chromium.org/1950883002
Cr-Commit-Position: refs/heads/master@{#391616}

[modify] https://crrev.com/a8d9d22865f445b8f6f2b9814fb919b8008fbc5c/content/browser/gamepad/raw_input_data_fetcher_win.cc

Comment 5 by ajha@chromium.org, May 23 2016

Components: IO>Gamepad
aicommander@: Shall we close this if there is no further work to be done on this.
Well, there's still the missing mapping for certain d-pads. I'm still unsure why Firefox can somehow have that displayed correctly and chrome can't.
Firefox will automatically convert axis 9 (HID usage 0x39, specified to be a D-Pad) into buttons. That's the reason you see buttons instead of an axis. Chrome doesn't do that, so you see the raw axis that the device exposes. It wouldn't be difficult to duplicate Firefox's behavior, but I want to have a discussion/resolution on the regression in 613429 before making further HID changes.
@#7, Thanks for the reply. Since it would seem that the other part of this bug has been fixed, I'd say it's probably fine to close this report.

Also, if you need a more visual representation of Gamepad API data, feel free to use my own tool http://gamepadviewer.com/. There's also a live raw output similar to html5gamepad.com's in the remapping modal, just make sure to select the appropriate player.

Comment 9 by ebra...@gnu.org, Jan 30 2017

Status: Fixed (was: Unconfirmed)
As ^
Components: -IO>Gamepad Blink>GamepadAPI

Sign in to add a comment