change(Controller): XBox 360 controller now default for vendor/productID

This commit is contained in:
2025-08-06 23:02:37 +02:00
parent 17361e888e
commit 8a7254a467

View File

@@ -22,6 +22,11 @@ type Controller struct {
}
func NewController(portName string, vendorID, productID uint16) (*Controller, error) {
if vendorID == 0 && productID == 0 {
// if no IDs were defined, imitate XBox 360 controller
vendorID = 0x45e
productID = 0x285
}
midiInput, err := NewMidiInput(portName)
if err != nil {
return nil, err