b/drivers/hid/hid-roccat-kone.c
@@ -912,6 +912,24 @@ static void kone_remove(struct hid_device *hdev)
hid_hw_stop(hdev);
}
+/* handle special events and keep actual profile and dpi values up to
date */
+static void kone_keep_values_up_to_date(struct kone_device *kone,
+ struct kone_mouse_event const *event)
+{
+ switch (event->event) {
+ case kone_mouse_event_switch_profile:
+ case kone_mouse_event_osd_profile:
+ kone->actual_profile = event->value;
+ kone->actual_dpi = kone->profiles[kone->actual_profile - 1].
+ startup_dpi;
+ break;
+ case kone_mouse_event_switch_dpi:
+ case kone_mouse_event_osd_dpi:
+ kone->actual_dpi = event->value;
+ break;
+ }
+}
+
/*
* Is called for keyboard- and mousepart.