forked from KolibriOS/kolibrios
USB HID mouse: horizontal scrolling
git-svn-id: svn://kolibrios.org@3741 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e7d71c7537
commit
05b437f60f
@ -25,6 +25,7 @@ buttons dd ? ; buttons that are currently pressed
|
|||||||
dx dd ? ; current x moving
|
dx dd ? ; current x moving
|
||||||
dy dd ? ; current y moving
|
dy dd ? ; current y moving
|
||||||
wheel dd ? ; current wheel moving
|
wheel dd ? ; current wheel moving
|
||||||
|
hwheel dd ?
|
||||||
ends
|
ends
|
||||||
|
|
||||||
; This procedure is called when HID layer detects a new mouse.
|
; This procedure is called when HID layer detects a new mouse.
|
||||||
@ -56,6 +57,7 @@ proc mouse_driver_begin_packet
|
|||||||
mov [edi+mouse_device_data.dx], 0
|
mov [edi+mouse_device_data.dx], 0
|
||||||
mov [edi+mouse_device_data.dy], 0
|
mov [edi+mouse_device_data.dy], 0
|
||||||
mov [edi+mouse_device_data.wheel], 0
|
mov [edi+mouse_device_data.wheel], 0
|
||||||
|
mov [edi+mouse_device_data.hwheel], 0
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -83,6 +85,8 @@ proc mouse_driver_input_field
|
|||||||
jz .y
|
jz .y
|
||||||
cmp ecx, USAGE_GD_WHEEL
|
cmp ecx, USAGE_GD_WHEEL
|
||||||
jz .wheel
|
jz .wheel
|
||||||
|
cmp ecx, 0xC0238
|
||||||
|
jz .hwheel
|
||||||
sub ecx, USAGE_BUTTON_PAGE + 1
|
sub ecx, USAGE_BUTTON_PAGE + 1
|
||||||
jb .unclaimed
|
jb .unclaimed
|
||||||
cmp ecx, 32
|
cmp ecx, 32
|
||||||
@ -129,6 +133,11 @@ end if
|
|||||||
neg edx
|
neg edx
|
||||||
mov [edi+mouse_device_data.wheel], edx
|
mov [edi+mouse_device_data.wheel], edx
|
||||||
ret
|
ret
|
||||||
|
.hwheel:
|
||||||
|
test byte [esi+report_field_group.flags], HID_FIELD_RELATIVE
|
||||||
|
jz .unclaimed
|
||||||
|
mov [edi+mouse_device_data.hwheel], edx
|
||||||
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
; This procedure is called when HID layer ends processing a new input packet
|
; This procedure is called when HID layer ends processing a new input packet
|
||||||
@ -141,6 +150,6 @@ proc mouse_driver_end_packet
|
|||||||
[edi+mouse_device_data.dx], \
|
[edi+mouse_device_data.dx], \
|
||||||
[edi+mouse_device_data.dy], \
|
[edi+mouse_device_data.dy], \
|
||||||
[edi+mouse_device_data.wheel], \
|
[edi+mouse_device_data.wheel], \
|
||||||
0
|
[edi+mouse_device_data.hwheel]
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
Loading…
Reference in New Issue
Block a user