Rémi Bernon : hidclass.sys: Re-read the poll timeout on every iteration.
Alexandre Julliard
julliard at winehq.org
Tue Oct 12 16:12:48 CDT 2021
Module: wine
Branch: master
Commit: 6a869a2a8c55764665e7e25c1abc59ecdbcc6905
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6a869a2a8c55764665e7e25c1abc59ecdbcc6905
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue Oct 12 10:33:23 2021 +0200
hidclass.sys: Re-read the poll timeout on every iteration.
Otherwise it's pointless to have it configurable.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/hidclass.sys/device.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index 29b9215aa22..d588970150e 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -313,9 +313,9 @@ static DWORD CALLBACK hid_device_thread(void *args)
BASE_DEVICE_EXTENSION *ext = device->DeviceExtension;
HIDP_COLLECTION_DESC *desc = ext->u.pdo.device_desc.CollectionDesc;
BOOL polled = ext->u.pdo.information.Polled;
- ULONG report_id = 0, timeout = 0;
HIDP_REPORT_IDS *report;
HID_XFER_PACKET *packet;
+ ULONG report_id = 0;
IO_STATUS_BLOCK io;
BYTE *buffer;
DWORD res;
@@ -324,8 +324,6 @@ static DWORD CALLBACK hid_device_thread(void *args)
buffer = (BYTE *)(packet + 1);
packet->reportBuffer = buffer;
- if (polled) timeout = ext->u.pdo.poll_interval;
-
report = find_report_with_type_and_id( ext, HidP_Input, 0, TRUE );
if (!report) WARN("no input report found.\n");
else report_id = report->ReportID;
@@ -356,7 +354,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
hid_device_queue_input( device, packet );
}
- res = WaitForSingleObject(ext->u.pdo.halt_event, timeout);
+ res = WaitForSingleObject(ext->u.pdo.halt_event, polled ? ext->u.pdo.poll_interval : 0);
} while (res == WAIT_TIMEOUT);
TRACE("device thread exiting, res %#x\n", res);
More information about the wine-cvs
mailing list