Skip to content

Discussion: GlobalProductId #1

@briaguya0

Description

@briaguya0

First and foremost the idea of having a global identifier for devices is an awesome one. I also know it's not an entirely new idea, and I'd love to start a conversation about how to avoid some of the pitfalls that similar systems have encountered.

The project I'm most familiar with that has something similar is SDL (specifically https://github.com/mdqinc/SDL_GameControllerDB).

The main issue I've noticed there is controllers with different layouts that share USB VID/PID:

There has been some work done to use CRCs based on device names in SDL to reduce collisions (libsdl-org/SDL@3cbfd75, mdqinc/SDL_GameControllerDB#609), but this is not a foolproof solution.

One example where this solution was not viable is discussed in mdqinc/SDL_GameControllerDB#625, where a controller adapter packaged as a "Mayflash N64 Controller Adapter for PC USB" uses the same VID/PID (VID/PID: 0x0e8f/0x3013) and name ("HuiJia USB GamePad") as "HuiJia SNES". This means that there are 2 different devices with completely different sets of buttons/axes that result in identical SDL GUIDs.

I'm sure handling cases like this is an achievable goal for the GlobalProductId in this project, and I'm looking forward to hearing ideas people have! I'm certain with enough minds on this an elegant solution will be found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions