tools/record: print the HID report descriptor as hex

YAML does support hex as long as it's 0x-prefixed. The comment here (probably)
dates from an in-development version of libinput-record that used JSON.
Anyway, let's print the HID report descriptor as hex because that's the common
format for it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-04-29 10:04:46 +10:00
parent 57811e40f0
commit 7da7cd216f

View file

@ -1597,8 +1597,7 @@ print_hid_report_descriptor(struct record_device *dev)
while ((len = read(fd, buf, sizeof(buf))) > 0) {
for (int i = 0; i < len; i++) {
/* YAML requires decimal */
iprintf(dev->fp, I_NONE, "%s%u", sep, buf[i]);
iprintf(dev->fp, I_NONE, "%s0x%02x", sep, buf[i]);
sep = ", ";
}
}