tools: add rel dial support to libinput-list-devices
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 22 Oct 2024 01:54:45 +0000 (11:54 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 22 Oct 2024 01:54:45 +0000 (11:54 +1000)
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1068>

tools/libinput-list-devices.c

index 0f738f6d2a6c4abec0114c7779467b016f6cba7e..e241dce5e91f4f5c9ad0f94d9c80fdbfbeafba34 100644 (file)
@@ -259,12 +259,13 @@ rotation_default(struct libinput_device *device)
 static void
 print_pad_info(struct libinput_device *device)
 {
-       int nbuttons, nrings, nstrips, ngroups, nmodes;
+       int nbuttons, nrings, nstrips, ndials, ngroups, nmodes;
        struct libinput_tablet_pad_mode_group *group;
 
        nbuttons = libinput_device_tablet_pad_get_num_buttons(device);
        nrings = libinput_device_tablet_pad_get_num_rings(device);
        nstrips = libinput_device_tablet_pad_get_num_strips(device);
+       ndials = libinput_device_tablet_pad_get_num_dials(device);
        ngroups = libinput_device_tablet_pad_get_num_mode_groups(device);
 
        group = libinput_device_tablet_pad_get_mode_group(device, 0);
@@ -273,6 +274,7 @@ print_pad_info(struct libinput_device *device)
        printf("Pad:\n");
        printf("        Rings:   %d\n", nrings);
        printf("        Strips:  %d\n", nstrips);
+       printf("        Dials:   %d\n", ndials);
        printf("        Buttons: %d\n", nbuttons);
        printf("        Mode groups: %d (%d modes)\n", ngroups, nmodes);