hidclass.sys: Update reportBuffer pointer after reading packet from ringbuffer.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-10-26 21:52:58 +02:00 committed by Alexandre Julliard
parent fc1485b86b
commit 9581f4c15a
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,7 @@ static void HID_Device_processQueue(DEVICE_OBJECT *device)
if (buffer_size) if (buffer_size)
{ {
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp); IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp);
packet->reportBuffer = (BYTE *)packet + sizeof(*packet);
TRACE_(hid_report)("Processing Request (%i)\n",ptr); TRACE_(hid_report)("Processing Request (%i)\n",ptr);
if (irpsp->Parameters.Read.Length >= packet->reportBufferLen) if (irpsp->Parameters.Read.Length >= packet->reportBufferLen)
{ {
@ -645,6 +646,7 @@ NTSTATUS WINAPI HID_Device_read(DEVICE_OBJECT *device, IRP *irp)
if (buffer_size) if (buffer_size)
{ {
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
packet->reportBuffer = (BYTE *)packet + sizeof(*packet);
TRACE_(hid_report)("Got Packet %p %i\n", packet->reportBuffer, packet->reportBufferLen); TRACE_(hid_report)("Got Packet %p %i\n", packet->reportBuffer, packet->reportBufferLen);
if (irpsp->Parameters.Read.Length >= packet->reportBufferLen) if (irpsp->Parameters.Read.Length >= packet->reportBufferLen)
{ {