.y = -1,
.device = -1,
.slot = -1,
+ .keycode = 0,
},
.event_listener_list = NULL,
}
break;
case EV_KEY:
+ DbgPrint("EV_KEY: 0x%X\n", event->value);
+ s_info.event_data.keycode = event->value;
break;
case EV_REL:
break;
static void *event_thread_main(void *data)
{
fd_set set;
- int ret = 0;
+ long ret = 0;
struct input_event input_event;
char *ptr = (char *)&input_event;
int offset = 0;
ErrPrint("Error: %s\n", strerror(errno));
}
- status = pipe2(s_info.evt_pipe, O_NONBLOCK | O_CLOEXEC);
+ status = pipe2(s_info.evt_pipe, O_CLOEXEC);
if (status < 0) {
ErrPrint("Unable to prepare evt pipe: %s\n", strerror(errno));
if (close(s_info.handle) < 0) {
return LB_STATUS_ERROR_FAULT;
}
- status = pipe2(s_info.tcb_pipe, O_NONBLOCK | O_CLOEXEC);
+ status = pipe2(s_info.tcb_pipe, O_CLOEXEC);
if (status < 0) {
ErrPrint("Unable to prepare tcb pipe: %s\n", strerror(errno));
if (close(s_info.handle) < 0) {
if (status != 0) {
ErrPrint("Failed to join a thread: %s\n", strerror(errno));
} else {
- DbgPrint("Thread returns: %d\n", (int)ret);
+ DbgPrint("Thread returns: %p\n", ret);
}
if (close(s_info.handle) < 0) {