diff --git a/android/hidhost.c b/android/hidhost.c
index 8bfdfed..0e0391a 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
g_free(dev);
}
-static void handle_uhid_event(struct hid_device *dev, struct uhid_event *ev)
+static void handle_uhid_output(struct hid_device *dev,
+ struct uhid_output_req *output)
{
int fd, i;
uint8_t *req = NULL;
if (!(dev->ctrl_io))
return;
- req_size = 1 + (ev->u.output.size / 2);
+ req_size = 1 + (output->size / 2);
req = g_try_malloc0(req_size);
if (!req)
return;
- req[0] = HID_MSG_SET_REPORT | ev->u.output.rtype;
+ req[0] = HID_MSG_SET_REPORT | output->rtype;
for (i = 0; i < (req_size - 1); i++)
- sscanf((char *) &(ev->u.output.data)[i * 2],
- "%hhx", &req[1 + i]);
+ sscanf((char *) &(output->data)[i * 2], "%hhx", &req[1 + i]);
fd = g_io_channel_unix_get_fd(dev->ctrl_io);
* asleep This is optional, though. */
break;
case UHID_OUTPUT:
+ handle_uhid_output(dev, &ev.u.output);
+ break;
case UHID_FEATURE:
- handle_uhid_event(dev, &ev);
+ /* TODO */
break;
case UHID_OUTPUT_EV:
/* This is only sent by kernels prior to linux-3.11. It