Skip to content

Commit

Permalink
HID: roccat: Normalized reported profile number for pyra button events.
Browse files Browse the repository at this point in the history
Pyra uses profile numbers in range 0-4 for everything except button
events. Using range 1-5 consistent now.

Signed-off-by: Stefan Achatz <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
erazor-de authored and Jiri Kosina committed Sep 1, 2010
1 parent cb7cf3d commit d2b570a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/hid/hid-roccat-pyra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit d2b570a

Please sign in to comment.