HID: roccat: Fixed false dpi reporting when using osd event
authorStefan Achatz <erazor_de@users.sourceforge.net>
Sat, 27 Aug 2011 13:24:36 +0000 (15:24 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 7 Sep 2011 11:38:27 +0000 (13:38 +0200)
Actual dpi resolution was set on wrong occassion.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-roccat-kone.c

index 2b8f3a31ffb314aa814e560d6fa7c221c9c3035a..7847a5bb88fb0cb5e970069783f6e5342ad485d9 100644 (file)
@@ -776,10 +776,10 @@ static void kone_keep_values_up_to_date(struct kone_device *kone,
 {
        switch (event->event) {
        case kone_mouse_event_switch_profile:
+               kone->actual_dpi = kone->profiles[event->value - 1].
+                               startup_dpi;
        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: