forked from drath/libratbag
ratbagd: if the action special type is invalid, change to unknown
This prevents us from sending -1 down the wire as unsigned int. This may be the cause of https://github.com/libratbag/piper/issues/208 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Thomas H. P. Andersen
parent
a786aaf390
commit
920b71d94c
@@ -128,6 +128,11 @@ static int ratbagd_button_get_special(sd_bus *bus,
|
||||
enum ratbag_button_action_special special;
|
||||
|
||||
special = ratbag_button_get_special(button->lib_button);
|
||||
if (special == RATBAG_BUTTON_ACTION_SPECIAL_INVALID) {
|
||||
log_error("%s: changing button special action from INVALID to UNKNOWN\n",
|
||||
ratbagd_device_get_sysname(button->device));
|
||||
special = RATBAG_BUTTON_ACTION_SPECIAL_UNKNOWN;
|
||||
}
|
||||
|
||||
return sd_bus_message_append(reply, "u", special);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user