1
0
forked from drath/libratbag

ratbagd: add support for test device button types

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2017-07-25 15:33:06 +10:00
committed by Benjamin Tissoires
parent 5f98d8d029
commit 5399d15658
4 changed files with 20 additions and 13 deletions

View File

@@ -102,6 +102,9 @@ test_read_button(struct ratbag_button *button)
struct ratbag_test_macro_event *e;
int idx;
/* Only take the button types from the first profile */
button->type = d->profiles[0].buttons[button->index].button_type;
switch (b->action_type) {
case RATBAG_BUTTON_ACTION_TYPE_BUTTON:
button->action.type = RATBAG_BUTTON_ACTION_TYPE_BUTTON;

View File

@@ -37,6 +37,7 @@ struct ratbag_test_macro_event {
};
struct ratbag_test_button {
enum ratbag_button_type button_type;
enum ratbag_button_action_type action_type;
union {
int button;