From 1eacc7839756fa8f937b97b57afc2d6bc7675320 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 26 Aug 2015 09:17:33 +1000 Subject: [PATCH] Drop RATBAG_CAP_BUTTON_PROFILES, unnessary The OS X tool for Logitech's gaming mouse did not allow button-profiles on the G500s, but DPI modes could be configured. This is an issue with the software, not the device itself since the device supports muliple profiles. So the original assumption that there are devices that have profiles for DPIs but not buttons is likely wrong, the devices we looked at so far all have profiles with a set of DPI modes in it, one of which is currently active. Signed-off-by: Peter Hutterer --- src/driver-etekcity.c | 1 - src/libratbag.h | 13 ------------- tools/ratbag-command.c | 3 --- 3 files changed, 17 deletions(-) diff --git a/src/driver-etekcity.c b/src/driver-etekcity.c index 554601dc..d806439a 100644 --- a/src/driver-etekcity.c +++ b/src/driver-etekcity.c @@ -200,7 +200,6 @@ etekcity_has_capability(const struct ratbag_device *device, enum ratbag_capabili return 0; case RATBAG_CAP_SWITCHABLE_RESOLUTION: case RATBAG_CAP_SWITCHABLE_PROFILE: - case RATBAG_CAP_BUTTON_PROFILES: case RATBAG_CAP_BUTTON_KEY: case RATBAG_CAP_BUTTON_MACROS: return 1; diff --git a/src/libratbag.h b/src/libratbag.h index 04d5053d..36a36f85 100644 --- a/src/libratbag.h +++ b/src/libratbag.h @@ -244,13 +244,6 @@ enum ratbag_capability { */ RATBAG_CAP_SWITCHABLE_PROFILE, - /** - * The device's button layout can be configured per-profile rather - * than once per device. - * FIXME: how do we handle a single button profile? - */ - RATBAG_CAP_BUTTON_PROFILES, - /** * The device supports assigning button numbers, key events or key + * modifier combinations. @@ -413,9 +406,6 @@ ratbag_profile_set_report_rate_hz(struct ratbag_profile *profile, int hz); * The button is refcounted with an initial value of at least 1. * Use ratbag_button_unref() to release the button. * - * @note If the device does not have @ref RATBAG_CAP_BUTTON_PROFILES, this - * function always returns NULL. Use ratbag_get_button_by_index() instead. - * * @param profile A previously initialized ratbag profile * @param index The index of the button * @@ -437,9 +427,6 @@ ratbag_profile_get_button_by_index(struct ratbag_profile *profile, * The button is refcounted with an initial value of at least 1. * Use ratbag_button_unref() to release the button. * - * @note If the device has @ref RATBAG_CAP_BUTTON_PROFILES, this function - * always returns NULL. Use ratbag_profile_get_button_by_index() instead. - * * @param ratbag A previously initialized ratbag context * @param index The index of the button * diff --git a/tools/ratbag-command.c b/tools/ratbag-command.c index 05df0c91..96940bcd 100644 --- a/tools/ratbag-command.c +++ b/tools/ratbag-command.c @@ -243,9 +243,6 @@ ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv) if (ratbag_device_has_capability(device, RATBAG_CAP_SWITCHABLE_PROFILE)) printf(" profile"); - if (ratbag_device_has_capability(device, - RATBAG_CAP_BUTTON_PROFILES)) - printf(" btn-profile"); if (ratbag_device_has_capability(device, RATBAG_CAP_BUTTON_KEY)) printf(" btn-key");