Rémi Bernon : hidclass.sys: Don't queue reports in polled mode.

Alexandre Julliard julliard at winehq.org
Tue Oct 12 16:12:48 CDT 2021


Module: wine
Branch: master
Commit: 64191946d3b588a55b93df1c95dec3fd56b757b1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=64191946d3b588a55b93df1c95dec3fd56b757b1

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Oct 12 10:33:24 2021 +0200

hidclass.sys: Don't queue 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   | 5 -----
 dlls/hidclass.sys/device.c | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index 7f933df3b06..a2719f65488 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -2183,16 +2183,12 @@ static void test_hidp( HANDLE file, HANDLE async_file, int report_id, BOOL polle
 
         SetLastError( 0xdeadbeef );
         ret = ReadFile( async_file, report, caps.InputReportByteLength, NULL, &overlapped );
-        todo_wine
         ok( !ret, "ReadFile succeeded\n" );
-        todo_wine
         ok( GetLastError() == ERROR_IO_PENDING, "ReadFile returned error %u\n", GetLastError() );
 
         SetLastError( 0xdeadbeef );
         ret = ReadFile( async_file, buffer, caps.InputReportByteLength, NULL, &overlapped2 );
-        todo_wine
         ok( !ret, "ReadFile succeeded\n" );
-        todo_wine
         ok( GetLastError() == ERROR_IO_PENDING, "ReadFile returned error %u\n", GetLastError() );
 
         /* wait for second report to be ready */
@@ -2205,7 +2201,6 @@ static void test_hidp( HANDLE file, HANDLE async_file, int report_id, BOOL polle
         ok( ret, "GetOverlappedResult failed, last error %u\n", GetLastError() );
         ok( value == (report_id ? 3 : 4), "GetOverlappedResult returned length %u, expected %u\n",
             value, (report_id ? 3 : 4) );
-        todo_wine
         ok( !memcmp( report, buffer, caps.InputReportByteLength ), "expected identical reports\n" );
 
         CloseHandle( overlapped.hEvent );
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index d588970150e..fb21e230ec4 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -264,7 +264,7 @@ static void hid_device_queue_input( DEVICE_OBJECT *device, HID_XFER_PACKET *pack
     KeAcquireSpinLock( &ext->u.pdo.queues_lock, &irql );
     LIST_FOR_EACH_ENTRY( queue, &ext->u.pdo.queues, struct hid_queue, entry )
     {
-        hid_queue_push_report( queue, last_report );
+        if (!polled) hid_queue_push_report( queue, last_report );
 
         do
         {




More information about the wine-cvs mailing list