pad: rename an argument for more clarity
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 23 Oct 2024 02:49:35 +0000 (12:49 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 31 Oct 2024 00:28:08 +0000 (10:28 +1000)
Yes, we're using the LED count here but what it is used for is the
number of modes.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1070>

src/evdev-tablet-pad-leds.c

index f1c70f82d08f7f3798fb677583a1faa5bb28cc3a..332bc7f62466fdb2347d3044706ec5df64c2a1aa 100644 (file)
@@ -157,7 +157,7 @@ pad_led_group_destroy(struct libinput_tablet_pad_mode_group *g)
 static struct pad_led_group *
 pad_group_new_basic(struct pad_dispatch *pad,
                    unsigned int group_index,
-                   int nleds)
+                   int num_modes)
 {
        struct pad_led_group *group;
 
@@ -166,7 +166,7 @@ pad_group_new_basic(struct pad_dispatch *pad,
        group->base.refcount = 1;
        group->base.index = group_index;
        group->base.current_mode = 0;
-       group->base.num_modes = nleds;
+       group->base.num_modes = num_modes;
        group->base.destroy = pad_led_group_destroy;
        list_init(&group->toggle_button_list);
        list_init(&group->led_list);