Made udev hwdb functionality optional

This commit is contained in:
Sam Lantinga
2025-12-21 09:15:23 -08:00
parent 4984eb8c16
commit ce0da58755
3 changed files with 10 additions and 7 deletions

View File

@@ -916,7 +916,7 @@ static struct hid_device_info * create_device_info_for_device(struct udev_device
root = cur_dev;
}
tmp->next = NULL;
hid_free_enumeration(tmp);
} else {
prev_dev = cur_dev;
@@ -1071,7 +1071,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
tmp = create_device_info_for_device(raw_dev);
if (tmp) {
if (!tmp->manufacturer_string) {
if (!tmp->manufacturer_string && udev_hwdb_new) {
key = "ID_VENDOR_FROM_DATABASE";
if ((hwdb = udev_hwdb_new(udev)) != NULL) {