hidpp20: fix reading of button mapping

When the button is not redirected, we need to rely on the control_id,
not the task_id to get the logical action of the button.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2015-08-21 16:59:36 -04:00
parent 88154c2438
commit cc7c85ffdf

View File

@@ -82,7 +82,7 @@ hidpp20drv_read_button(struct ratbag_button *button)
return;
control = &drv_data->controls[button->index];
mapping = control->task_id;
mapping = control->control_id;
if (control->reporting.divert || control->reporting.persist)
mapping = control->reporting.remapped;
log_debug(device->ratbag,