mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
tools: rename "rb" to "device"
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -100,7 +100,7 @@ static int
|
||||
ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv)
|
||||
{
|
||||
const char *path;
|
||||
struct ratbag_device *rb;
|
||||
struct ratbag_device *device;
|
||||
struct ratbag_profile *profile;
|
||||
struct ratbag_button *button;
|
||||
int i;
|
||||
@@ -120,25 +120,25 @@ ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv)
|
||||
if (!udev_device)
|
||||
return 1;
|
||||
|
||||
rb = ratbag_device_new_from_udev_device(ratbag, udev_device);
|
||||
if (!rb) {
|
||||
device = ratbag_device_new_from_udev_device(ratbag, udev_device);
|
||||
if (!device) {
|
||||
error("Looks like '%s' is not supported\n", path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
error("Opened '%s' (%s).\n", ratbag_device_get_name(rb), path);
|
||||
error("Opened '%s' (%s).\n", ratbag_device_get_name(device), path);
|
||||
|
||||
profile = ratbag_device_get_profile_by_index(rb, 0);
|
||||
ratbag_device_set_active_profile(rb, profile);
|
||||
profile = ratbag_device_get_profile_by_index(device, 0);
|
||||
ratbag_device_set_active_profile(device, profile);
|
||||
profile = ratbag_profile_unref(profile);
|
||||
|
||||
profile = ratbag_device_get_active_profile(rb);
|
||||
for (i = 0; i < ratbag_device_get_num_buttons(rb); i++) {
|
||||
profile = ratbag_device_get_active_profile(device);
|
||||
for (i = 0; i < ratbag_device_get_num_buttons(device); i++) {
|
||||
button = ratbag_profile_get_button_by_index(profile, i);
|
||||
button = ratbag_button_unref(button);
|
||||
}
|
||||
profile = ratbag_profile_unref(profile);
|
||||
rb = ratbag_device_unref(rb);
|
||||
device = ratbag_device_unref(device);
|
||||
|
||||
rc = 0;
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user