etekcity: fix the check for macro

The current code was checking if the previous action assigned to a button
was a macro, not that the action we are assigning will be a macro.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
This commit is contained in:
Benjamin Tissoires
2015-09-10 09:06:38 -04:00
parent d7ef078c02
commit f44f07c6a9

View File

@@ -631,7 +631,7 @@ etekcity_write_macro(struct ratbag_button *button,
unsigned i, j, count = 0;
int rc;
if (ratbag_button_get_action_type(button) != RATBAG_BUTTON_ACTION_TYPE_MACRO)
if (action->type != RATBAG_BUTTON_ACTION_TYPE_MACRO)
return 0;
device = button->profile->device;