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

Issue 784659 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

PS4 controller is not named, unlike Xbox one controller which is called "Xbox gamepad"

Reported by alastair...@gmail.com, Nov 14 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36

Steps to reproduce the problem:
1. Connect a PS4 Dualshock 4 v2 Controller to your computer
2. Look at the gamepad ID

What is the expected behavior?
The gamepad ID shows a generic sounding name for a popular controller. It should mention Sony, Dualshock or Playstation.

What went wrong?
"Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 09cc)" 

This isn't so helpful? Whereas other controllers like the latest Xbox One controller shows more useful information:

"Xbox 360 Controller (XInput STANDARD GAMEPAD)"

Even though it says "360" and not "One". 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 62.0.3202.89  Channel: stable
OS Version: 10.0
Flash Version: 

It'd make it much easier to know what kind of controller the users are using so I can give them the correct UI graphics to show in game. I'd love to know if they're using a Ps4 controller.
 
download.jpg
52.4 KB View Download
Cc: divya.pa...@techmahindra.com
Components: Blink>GamepadAPI
Labels: TE-NeedsTriageFromHYD TE-HardwareDependency Needs-Triage-M62
Request someone to take a look at this issue as PS4 is not available with ET-Hyd team
Status: WontFix (was: Unconfirmed)
You can use the vendor and product IDs to identify the controller. All Sony gamepads have vendor ID 054c. Dualshock4s may have product ID 05c4 (CUH-ZCT1), 09cc (CUH-ZCT2), or 0ba0 (when using the USB wireless adaptor). You may also want to check for Dualshock3/SIXAXIS gamepads which have product ID 0268.

"Wireless Controller" is the device name as reported by the device; it's not something Chrome should modify. (I agree, it's terribly unhelpful)

> Whereas other controllers like the latest Xbox One controller shows more useful information:

On Windows, every XInput gamepad appears in Chrome as "Xbox 360 Controller" because XInput doesn't expose information like vendor/product ID that could be used to identify the device.

For UI elements, I'd recommend using Xbox icons if the device is connected over XInput (on Windows) or has Microsoft's vendor ID 045e. Use Dualshock icons for devices with Sony's vendor ID 054c.
Thanks Matt, do you know if there's a site or database of controllers I can see what each controller's product and vendor ID is? So I don't have to buy them all.
This is a regularly updated list of vendor/product pairs for known USB devices:

http://www.linux-usb.org/usb.ids

SDL maintains a list of default mappings for known gamepads. e.g., here's Dualshock4:

"030000004c050000c405000011010000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",

The first item is a hex string that combines the vendor ID, product ID, version, and some other info to create a unique identifier for this model of gamepad, which you can reverse to get the vendor/product IDs. Here's the full list:

https://hg.libsdl.org/SDL/file/tip/src/joystick/SDL_gamecontrollerdb.h

The 360Controller third-party Xbox controller driver for Mac supports a lot of devices that are Xbox-compatible but aren't Microsoft products. It lists the supported devices along with their vendor/product IDs here:

https://github.com/360Controller/360Controller/blob/fb703ccd51b528c6f1d830015e7ecdfa01e7ee3e/360Controller/Info.plist
Thank you very much!

Sign in to add a comment