Commit 09895076 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidclass.sys: Only send WM_INPUT messages for HID devices.

And not for the internal WINEXINPUT devices. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 9d5e9b5f
...@@ -190,27 +190,30 @@ static void hid_device_queue_input( DEVICE_OBJECT *device, HID_XFER_PACKET *pack ...@@ -190,27 +190,30 @@ static void hid_device_queue_input( DEVICE_OBJECT *device, HID_XFER_PACKET *pack
KIRQL irql; KIRQL irql;
IRP *irp; IRP *irp;
size = offsetof( RAWINPUT, data.hid.bRawData[packet->reportBufferLen] ); if (IsEqualGUID( ext->class_guid, &GUID_DEVINTERFACE_HID ))
if (!(rawinput = malloc( size ))) ERR( "Failed to allocate rawinput data!\n" );
else
{ {
INPUT input; size = offsetof( RAWINPUT, data.hid.bRawData[packet->reportBufferLen] );
if (!(rawinput = malloc( size ))) ERR( "Failed to allocate rawinput data!\n" );
rawinput->header.dwType = RIM_TYPEHID; else
rawinput->header.dwSize = size; {
rawinput->header.hDevice = ULongToHandle( ext->u.pdo.rawinput_handle ); INPUT input;
rawinput->header.wParam = RIM_INPUT;
rawinput->data.hid.dwCount = 1; rawinput->header.dwType = RIM_TYPEHID;
rawinput->data.hid.dwSizeHid = packet->reportBufferLen; rawinput->header.dwSize = size;
memcpy( rawinput->data.hid.bRawData, packet->reportBuffer, packet->reportBufferLen ); rawinput->header.hDevice = ULongToHandle( ext->u.pdo.rawinput_handle );
rawinput->header.wParam = RIM_INPUT;
input.type = INPUT_HARDWARE; rawinput->data.hid.dwCount = 1;
input.hi.uMsg = WM_INPUT; rawinput->data.hid.dwSizeHid = packet->reportBufferLen;
input.hi.wParamH = 0; memcpy( rawinput->data.hid.bRawData, packet->reportBuffer, packet->reportBufferLen );
input.hi.wParamL = 0;
__wine_send_input( 0, &input, rawinput ); input.type = INPUT_HARDWARE;
input.hi.uMsg = WM_INPUT;
free( rawinput ); input.hi.wParamH = 0;
input.hi.wParamL = 0;
__wine_send_input( 0, &input, rawinput );
free( rawinput );
}
} }
if (!(last_report = hid_report_create( packet ))) if (!(last_report = hid_report_create( packet )))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment