[PATCH 5/5] hidclass.sys: Call HID_READ_REPORT to read reports in polled mode.

Rémi Bernon rbernon at codeweavers.com
Fri Sep 10 02:22:45 CDT 2021


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 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)
         {
-- 
2.33.0




More information about the wine-devel mailing list