Saw a case on windows where HID_API didn't return objects grouped together so this logic failed. Swapping to just look at interace 0. All trackable devices should have this interface defined
@@ -172,7 +172,7 @@ static survive_usb_device_t get_next_device(survive_usb_device_enumerator* d, su
}
for (survive_usb_device_t c = (*d)->next; c; c = c->next) {
- if (c->vendor_id != (*d)->vendor_id || c->product_id != (*d)->product_id) {
+ if (c->interface_number == 0) {
return *d = c;
}
}
