From 9c501166463112d421198650d7f51076a7eae712 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Wed, 21 Dec 2022 23:37:10 +0300 Subject: [PATCH] sinowealth: enable profile cycling mapping with a preprocessor macro They suck, but we already do have the SINOWEALTH_NUM_PROFILES thing, let's at least give it all possible capabilities if it is used. --- src/driver-sinowealth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/driver-sinowealth.c b/src/driver-sinowealth.c index 0c64dca4..5a297f34 100644 --- a/src/driver-sinowealth.c +++ b/src/driver-sinowealth.c @@ -488,9 +488,11 @@ static const struct sinowealth_button_mapping sinowealth_button_map[] = { /* None of the other bits do anything. */ { { SINOWEALTH_BUTTON_TYPE_SPECIAL, { { 0x1 } } }, BUTTON_ACTION_NONE }, +#if SINOWEALTH_NUM_PROFILES > 1 /* See the note near @ref SINOWEALTH_NUM_PROFILES. */ /* Hidden. */ - /* { { SINOWEALTH_BUTTON_TYPE_SPECIAL, { { 0x6 } } }, BUTTON_ACTION_SPECIAL(RATBAG_BUTTON_ACTION_SPECIAL_PROFILE_UP) }, */ + { { SINOWEALTH_BUTTON_TYPE_SPECIAL, { { 0x6 } } }, BUTTON_ACTION_SPECIAL(RATBAG_BUTTON_ACTION_SPECIAL_PROFILE_UP) }, +#endif /* This must defined after `SPECIAL` type so that correct raw data * for action type `NONE` is used. */