This commit is contained in:
Benoit Verkindt 2017-10-02 13:27:14 +00:00 committed by GitHub
commit 1fb772a6a1

View file

@ -133,10 +133,19 @@ func (hub *Hub) refreshWallets() {
} }
for _, info := range hid.Enumerate(hub.vendorID, 0) { for _, info := range hid.Enumerate(hub.vendorID, 0) {
for _, id := range hub.productIDs { for _, id := range hub.productIDs {
if info.ProductID == id && info.Interface == 0 { // The HID interface number is not available on windows and OSX
devices = append(devices, info) if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
break if info.ProductID == id && info.Interface == -1 {
devices = append(devices, info)
break
}
} else {
if info.ProductID == id && info.Interface == 0 {
devices = append(devices, info)
break
}
} }
} }
} }
if runtime.GOOS == "linux" { if runtime.GOOS == "linux" {