Fixed is_BLE() return value

This commit is contained in:
Sam Lantinga 2020-11-21 09:26:11 -08:00
parent 65c9f1d2cc
commit 6b56b98fc3
1 changed files with 5 additions and 4 deletions

View File

@ -298,13 +298,13 @@ static int is_BLE(hid_device *dev)
"hid", "hid",
NULL); NULL);
if (hid_dev) { if (hid_dev) {
unsigned short dev_vid; unsigned short dev_vid = 0;
unsigned short dev_pid; unsigned short dev_pid = 0;
int bus_type; int bus_type = 0;
char *serial_number_utf8 = NULL; char *serial_number_utf8 = NULL;
char *product_name_utf8 = NULL; char *product_name_utf8 = NULL;
ret = parse_uevent_info( parse_uevent_info(
udev_device_get_sysattr_value(hid_dev, "uevent"), udev_device_get_sysattr_value(hid_dev, "uevent"),
&bus_type, &bus_type,
&dev_vid, &dev_vid,
@ -845,6 +845,7 @@ int HID_API_EXPORT hid_get_feature_report(hid_device *dev, unsigned char *data,
int res; int res;
/* It looks like HIDIOCGFEATURE() on Bluetooth LE devices doesn't return the report number */ /* It looks like HIDIOCGFEATURE() on Bluetooth LE devices doesn't return the report number */
printf("HIDIOCGFEATURE\n");
if (dev->needs_ble_hack) { if (dev->needs_ble_hack) {
data[1] = data[0]; data[1] = data[0];
++data; ++data;