Rémi Bernon : winebus.sys: Add some buttons to HID mouse input report.
Alexandre Julliard
julliard at winehq.org
Fri Jun 4 14:32:29 CDT 2021
Module: wine
Branch: master
Commit: 318e5feda581e601aa0c5a7023a1749733617e74
URL: https://source.winehq.org/git/wine.git/?a=commit;h=318e5feda581e601aa0c5a7023a1749733617e74
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Fri Jun 4 12:47:05 2021 +0200
winebus.sys: Add some buttons to HID mouse input report.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winebus.sys/main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c
index 99f834d2f40..a572d11f822 100644
--- a/dlls/winebus.sys/main.c
+++ b/dlls/winebus.sys/main.c
@@ -476,12 +476,13 @@ static NTSTATUS mouse_get_reportdescriptor(DEVICE_OBJECT *device, BYTE *buffer,
{
TRACE("buffer %p, length %u.\n", buffer, length);
- *ret_length = sizeof(REPORT_HEADER) + sizeof(REPORT_TAIL);
- if (length < sizeof(REPORT_HEADER) + sizeof(REPORT_TAIL))
+ *ret_length = sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS) + sizeof(REPORT_TAIL);
+ if (length < sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS) + sizeof(REPORT_TAIL))
return STATUS_BUFFER_TOO_SMALL;
memcpy(buffer, REPORT_HEADER, sizeof(REPORT_HEADER));
- memcpy(buffer + sizeof(REPORT_HEADER), REPORT_TAIL, sizeof(REPORT_TAIL));
+ add_button_block(buffer + sizeof(REPORT_HEADER), 1, 3);
+ memcpy(buffer + sizeof(REPORT_HEADER) + sizeof(REPORT_BUTTONS), REPORT_TAIL, sizeof(REPORT_TAIL));
buffer[IDX_HEADER_PAGE] = HID_USAGE_PAGE_GENERIC;
buffer[IDX_HEADER_USAGE] = HID_USAGE_GENERIC_MOUSE;
More information about the wine-cvs
mailing list