Commit d2b570a5 authored by Stefan Achatz's avatar Stefan Achatz Committed by Jiri Kosina

HID: roccat: Normalized reported profile number for pyra button events.

Pyra uses profile numbers in range 0-4 for everything except button
events. Using range 1-5 consistent now.
Signed-off-by: default avatarStefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent cb7cf3da
......@@ -902,7 +902,11 @@ static void pyra_report_to_chrdev(struct pyra_device const *pyra,
if (button_event->data2 == PYRA_MOUSE_EVENT_BUTTON_PRESS) {
roccat_report.type = button_event->type;
roccat_report.key = button_event->data1;
roccat_report.value = pyra->actual_profile;
/*
* pyra reports profile numbers with range 1-5.
* Keeping this behaviour.
*/
roccat_report.value = pyra->actual_profile + 1;
roccat_report_event(pyra->chrdev_minor,
(uint8_t const *)&roccat_report,
sizeof(struct pyra_roccat_report));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment