Skip to content

Commit

Permalink
skip bluetooth hid enumeration for webOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Nov 4, 2023
1 parent 5b1d240 commit 4146c8a
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/hidapi/webos/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,22 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
break;

case BUS_BLUETOOTH:
/* Manufacturer and Product strings */
cur_dev->manufacturer_string = wcsdup(L"");
cur_dev->product_string = utf8_to_wchar_t(product_name_utf8);

break;
/* webOS doesn't handle bluetooth HID device as expected, so skip enumerating them */
/* Free this device */
free(cur_dev->serial_number);
free(cur_dev->path);
free(cur_dev);

/* Take it off the device list. */
if (prev_dev) {
prev_dev->next = NULL;
cur_dev = prev_dev;
}
else {
cur_dev = root = NULL;
}

goto next;

default:
/* Unknown device type - this should never happen, as we
Expand Down

0 comments on commit 4146c8a

Please sign in to comment.