winebus.sys: Return an event from IOHID bus wait on input report.
Instead of calling process_hid_report. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e0ac56267f
commit
bc0ad0e13b
|
@ -29,10 +29,6 @@
|
|||
|
||||
struct unix_device *get_unix_device(DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
|
||||
|
||||
/* HID Plug and Play Bus */
|
||||
DEVICE_OBJECT *bus_find_hid_device(const WCHAR *bus_id, void *platform_dev) DECLSPEC_HIDDEN;
|
||||
void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length) DECLSPEC_HIDDEN;
|
||||
|
||||
/* General Bus Functions */
|
||||
BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -133,8 +133,8 @@ static void handle_IOHIDDeviceIOHIDReportCallback(void *context,
|
|||
IOReturn result, void *sender, IOHIDReportType type,
|
||||
uint32_t reportID, uint8_t *report, CFIndex report_length)
|
||||
{
|
||||
DEVICE_OBJECT *device = (DEVICE_OBJECT*)context;
|
||||
process_hid_report(device, report, report_length);
|
||||
struct unix_device *iface = (struct unix_device *)context;
|
||||
bus_event_queue_input_report(&event_queue, iface, report, report_length);
|
||||
}
|
||||
|
||||
static void iohid_device_destroy(struct unix_device *iface)
|
||||
|
@ -161,7 +161,7 @@ static NTSTATUS iohid_device_start(struct unix_device *iface, DEVICE_OBJECT *dev
|
|||
length = CFNumberToDWORD(num);
|
||||
private->buffer = HeapAlloc(GetProcessHeap(), 0, length);
|
||||
|
||||
IOHIDDeviceRegisterInputReportCallback(private->device, private->buffer, length, handle_IOHIDDeviceIOHIDReportCallback, device);
|
||||
IOHIDDeviceRegisterInputReportCallback(private->device, private->buffer, length, handle_IOHIDDeviceIOHIDReportCallback, iface);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -378,6 +378,9 @@ NTSTATUS iohid_bus_wait(void *args)
|
|||
{
|
||||
struct bus_event *result = args;
|
||||
|
||||
/* cleanup previously returned event */
|
||||
bus_event_cleanup(result);
|
||||
|
||||
do
|
||||
{
|
||||
if (bus_event_queue_pop(&event_queue, result)) return STATUS_PENDING;
|
||||
|
|
|
@ -370,7 +370,7 @@ static DEVICE_OBJECT *bus_create_hid_device(struct device_desc *desc, struct uni
|
|||
return device;
|
||||
}
|
||||
|
||||
DEVICE_OBJECT *bus_find_hid_device(const WCHAR *bus_id, void *platform_dev)
|
||||
static DEVICE_OBJECT *bus_find_hid_device(const WCHAR *bus_id, void *platform_dev)
|
||||
{
|
||||
struct device_extension *ext;
|
||||
DEVICE_OBJECT *ret = NULL;
|
||||
|
@ -477,7 +477,7 @@ static NTSTATUS deliver_last_report(struct device_extension *ext, DWORD buffer_l
|
|||
}
|
||||
}
|
||||
|
||||
void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length)
|
||||
static void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length)
|
||||
{
|
||||
struct device_extension *ext = (struct device_extension*)device->DeviceExtension;
|
||||
IRP *irp;
|
||||
|
|
Loading…
Reference in New Issue