Print error message if no HID device is connected when using hidapi
This commit is contained in:
parent
14446950df
commit
867d83c215
|
@ -93,8 +93,10 @@ static int usbhid_open(const char *port, union pinfo pinfo, union filedescriptor
|
|||
*/
|
||||
struct hid_device_info *list, *walk;
|
||||
list = hid_enumerate(pinfo.usbinfo.vid, pinfo.usbinfo.pid);
|
||||
if (list == NULL)
|
||||
if (list == NULL) {
|
||||
pmsg_error("No USB HID devices found\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
walk = list;
|
||||
while (walk)
|
||||
|
|
Loading…
Reference in New Issue