Zuzu-Typ / XInput-Python

Simple access to the DirectX input API for Python
zlib License
28 stars 5 forks source link

Gamepad type/brand #11

Open buestad opened 4 months ago

buestad commented 4 months ago

Is there a way to know which type/brand of gamepad is connected? (Logitech, X-box ...) I want to change the button layout in the GUI based on gamepad type

Zuzu-Typ commented 4 months ago

Hi @buestad, Unfortunately there isn't any straightforward way to do this. Although there is an XInput function that allows you to get vendor information provided by Microsoft, it's undocumented and therefore might not be future proof or safe to use. See https://stackoverflow.com/questions/64251320/is-it-possible-to-get-an-xinput-devices-name-product-id-vendor-id-or-some-oth