ToadKing / wii-u-gc-adapter

Tool for using the Wii U GameCube Adapter on Linux
MIT License
240 stars 42 forks source link

Allow users to specify vendor/product id for uinput #55

Closed pimzero closed 3 years ago

pimzero commented 3 years ago

This patch adds --product and --vendor that will be used for the emulated device.

Example usage: $ # Let's emulate OUYA Game Controller (2836:0001) $ ./wii-u-gc-adapter --vendor 0x2836 --product 0x1

This is useful in the context of applications with limited supported devices, such as chromium/google-chrome (therefore allowing to use NGC controllers with the gamepad API used, for instance, by Stadia/Geforce NOW). For this specific use case, the best solution would probably be to add the device to the supported devices, but as there is no support for the NGC adapter but here, I am not sure it makes sense. What do you think ?

pimzero commented 3 years ago

If you want to add more flags I think it would be better to do it using something like getopt instead of hacking more on manually. Would make the code much cleaner.

Done.