tools/debug-events: print the region mapping id

This changes the region print format from a string to a dict
This commit is contained in:
Peter Hutterer 2023-09-01 12:17:40 +10:00
parent c179b3dac1
commit d9d4630567

View file

@ -164,8 +164,10 @@ print_device_details(struct ei_event *event)
uint32_t y = ei_region_get_y(region);
double scale = ei_region_get_physical_scale(region);
printf(" - %ux%u@%u,%u*%.2f\n", w, h, x, y, scale);
const char *mapping_id = ei_region_get_mapping_id(region);
printf(" - { x: %u, y: %u, w: %u, h: %u, scale: %.2f, mapping_id: '%s' }\n",
x, y, w, h, scale,
mapping_id ? mapping_id : "<none>");
}
struct ei_keymap *keymap = ei_device_keyboard_get_keymap(device);