Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the id #65

Closed
GrosSacASac opened this issue Nov 25, 2017 · 3 comments
Closed

About the id #65

GrosSacASac opened this issue Nov 25, 2017 · 3 comments
Labels

Comments

@GrosSacASac
Copy link

An identification string for the gamepad. This string identifies the brand or style of connected gamepad device. Typically, this will include the USB vendor and a product ID.

Is there any guarantee that it is both unique(for all gamepads in the world) and immutable (for a given gamepad) ?

@luser
Copy link
Contributor

luser commented Nov 27, 2017

Is there any guarantee that it is both unique(for all gamepads in the world) and immutable (for a given gamepad) ?

The id field is incredibly underspecified in general. It came from my original implementation in Firefox where I just wanted some way to expose the vendor and product IDs from the USB device. USB vendor IDs are managed by the USB group, but I've definitely seen the same chipset used in several different cheap USB gamepads with the exact same vendor+product IDs, so it's not a very strong guarantee.

As to immutability, that should always hold true, and we could add spec text to that effect. I'm wary of trying to really spec out the id field, I think it wasn't a great idea in the first place and we should probably just spec something where we can expose things like the vendor and product IDs as separate fields when they're available.

@ylafon
Copy link
Member

ylafon commented Nov 27, 2017

Using VID:PID seems the most discriminant thing you can use, there is nothing really better that can be done until there are better ways to do local remapping (I see it is a Feature Request.
Formally define the Id would be useful later for local remapping. Also adding the device name would be insignificant as names are even more shared then VID:PID.

@sgraham
Copy link
Contributor

sgraham commented Feb 14, 2018

I think for v1, it's just a string that might tell you something about the device type. For v2 we can try to separate out vid/pid, or something more helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants