@@ -38,8 +38,10 @@ static int a4_input_mapped(struct hid_device *hdev, struct hid_input *hi,
38
38
{
39
39
struct a4tech_sc * a4 = hid_get_drvdata (hdev );
40
40
41
- if (usage -> type == EV_REL && usage -> code == REL_WHEEL )
41
+ if (usage -> type == EV_REL && usage -> code == REL_WHEEL_HI_RES ) {
42
42
set_bit (REL_HWHEEL , * bit );
43
+ set_bit (REL_HWHEEL_HI_RES , * bit );
44
+ }
43
45
44
46
if ((a4 -> quirks & A4_2WHEEL_MOUSE_HACK_7 ) && usage -> hid == 0x00090007 )
45
47
return -1 ;
@@ -60,14 +62,16 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field,
60
62
input = field -> hidinput -> input ;
61
63
62
64
if (a4 -> quirks & A4_2WHEEL_MOUSE_HACK_B8 ) {
63
- if (usage -> type == EV_REL && usage -> code == REL_WHEEL ) {
65
+ if (usage -> type == EV_REL && usage -> code == REL_WHEEL_HI_RES ) {
64
66
a4 -> delayed_value = value ;
65
67
return 1 ;
66
68
}
67
69
68
70
if (usage -> hid == 0x000100b8 ) {
69
71
input_event (input , EV_REL , value ? REL_HWHEEL :
70
72
REL_WHEEL , a4 -> delayed_value );
73
+ input_event (input , EV_REL , value ? REL_HWHEEL_HI_RES :
74
+ REL_WHEEL_HI_RES , a4 -> delayed_value * 120 );
71
75
return 1 ;
72
76
}
73
77
}
@@ -77,8 +81,9 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field,
77
81
return 1 ;
78
82
}
79
83
80
- if (usage -> code == REL_WHEEL && a4 -> hw_wheel ) {
84
+ if (usage -> code == REL_WHEEL_HI_RES && a4 -> hw_wheel ) {
81
85
input_event (input , usage -> type , REL_HWHEEL , value );
86
+ input_event (input , usage -> type , REL_HWHEEL_HI_RES , value * 120 );
82
87
return 1 ;
83
88
}
84
89
0 commit comments