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

View file

@ -133,11 +133,20 @@ func (hub *Hub) refreshWallets() {
}
for _, info := range hid.Enumerate(hub.vendorID, 0) {
for _, id := range hub.productIDs {
// The HID interface number is not available on windows and OSX
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" {
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" {
// See rationale before the enumeration why this is needed and only on Linux.