Rémi Bernon : hidclass.sys: Call HID_READ_REPORT to read reports in polled mode.
Alexandre Julliard
julliard at winehq.org
Fri Sep 10 15:29:46 CDT 2021
Module: wine
Branch: master
Commit: 78254f6ec34502f9b4f922fa3dc371bf835adb43
URL: https://source.winehq.org/git/wine.git/?a=commit;h=78254f6ec34502f9b4f922fa3dc371bf835adb43
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Fri Sep 10 09:22:45 2021 +0200
hidclass.sys: Call HID_READ_REPORT to read reports in polled mode.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput8/tests/hid.c | 1 -
dlls/hidclass.sys/device.c | 8 ++------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index ebf3a6e7da9..4483a5ec479 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -1839,7 +1839,6 @@ static void test_hidp( HANDLE file, HANDLE async_file, int report_id, BOOL polle
ret = GetOverlappedResult( async_file, &overlapped, &value, FALSE );
ok( ret, "GetOverlappedResult failed, last error %u\n", GetLastError() );
ok( value == (report_id ? 3 : 4), "GetOverlappedResult returned length %u, expected 3\n", value );
- todo_wine
ok( memcmp( report, buffer + caps.InputReportByteLength, caps.InputReportByteLength ),
"expected different report\n" );
ok( !memcmp( report, buffer, caps.InputReportByteLength ), "expected identical reports\n" );
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index ed7cd76fcde..9b91834267e 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -278,12 +278,8 @@ static DWORD CALLBACK hid_device_thread(void *args)
packet->reportBufferLen--;
}
- if (!poll_interval)
- call_minidriver( IOCTL_HID_READ_REPORT, ext->u.pdo.parent_fdo, NULL, 0,
- packet->reportBuffer, packet->reportBufferLen, &io );
- else
- call_minidriver( IOCTL_HID_GET_INPUT_REPORT, ext->u.pdo.parent_fdo, NULL, 0,
- packet, sizeof(*packet), &io );
+ call_minidriver( IOCTL_HID_READ_REPORT, ext->u.pdo.parent_fdo, NULL, 0,
+ packet->reportBuffer, packet->reportBufferLen, &io );
if (io.Status == STATUS_SUCCESS)
{
More information about the wine-cvs
mailing list