hidraw: only show the report IDs once

This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-09-13 18:17:09 +02:00
parent 55fc8dc721
commit fc13c15fe2

View File

@@ -74,9 +74,10 @@ ratbag_hidraw_parse_report_descriptor(struct ratbag_device *device)
for (j = 0; j < size; j++) {
report_id |= report_desc.value[i + j + 1] << ((size - j - 1) * 8);
log_debug(device->ratbag, "report ID %02x\n", report_id);
if (hidraw->report_ids)
if (hidraw->report_ids) {
log_debug(device->ratbag, "report ID %02x\n", report_id);
hidraw->report_ids[hidraw->num_report_ids] = report_id;
}
hidraw->num_report_ids++;
}
}