Skip to content

Commit

Permalink
Continue to the next device if a device fails to open
Browse files Browse the repository at this point in the history
One of the HID devices on my system can't be opened and this causes all
devices after it to be ignored when enumerating devices.
  • Loading branch information
nomis committed Mar 22, 2021
1 parent f769fcd commit a88f0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/purejavahidapi/windows/WindowsBackend.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public List<purejavahidapi.HidDeviceInfo> enumerateDevices() {
// recreate as above when opening the device
devHandle = openDeviceHandle(path, true);
if (devHandle == INVALID_HANDLE_VALUE)
break;
continue;

HIDD_ATTRIBUTES attrib = new HIDD_ATTRIBUTES();
attrib.Size = new NativeLong(attrib.size());
Expand Down

0 comments on commit a88f0f6

Please sign in to comment.