diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2010-05-19 07:53:22 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-05-19 07:53:22 -0400 |
commit | 73b3577d5dc80bf5f079ddd5c0449459a1997765 (patch) | |
tree | c8d5c87fcbeeddc91a2165b25b582d2f5a6aa0a1 /drivers/hid/hid-roccat-kone.c | |
parent | 00237bc5204c43f67b2e68546012d7bd27efc1b6 (diff) |
HID: roccat: fix special button support
Added new data and changed workaround for abnormal button behaviour
according to new gained knowledge about Roccat Kone device.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat-kone.c')
-rw-r--r-- | drivers/hid/hid-roccat-kone.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index a41df9ab2877..5d9ced0defa5 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c | |||
@@ -928,14 +928,15 @@ static int kone_raw_event(struct hid_device *hdev, struct hid_report *report, | |||
928 | return 0; | 928 | return 0; |
929 | 929 | ||
930 | /* | 930 | /* |
931 | * Firmware 1.38 introduced new behaviour for tilt buttons. | 931 | * Firmware 1.38 introduced new behaviour for tilt and special buttons. |
932 | * Pressed tilt button is reported in each movement event. | 932 | * Pressed button is reported in each movement event. |
933 | * Workaround sends only one event per press. | 933 | * Workaround sends only one event per press. |
934 | */ | 934 | */ |
935 | if (kone->last_tilt_state == event->tilt) | 935 | if (memcmp(&kone->last_mouse_event.tilt, &event->tilt, 5)) |
936 | event->tilt = 0; | 936 | memcpy(&kone->last_mouse_event, event, |
937 | sizeof(struct kone_mouse_event)); | ||
937 | else | 938 | else |
938 | kone->last_tilt_state = event->tilt; | 939 | memset(&event->tilt, 0, 5); |
939 | 940 | ||
940 | /* | 941 | /* |
941 | * handle special events and keep actual profile and dpi values | 942 | * handle special events and keep actual profile and dpi values |