diff --git a/src/sysinput.c b/src/sysinput.c index 28e7864..ebc0ae5 100644 --- a/src/sysinput.c +++ b/src/sysinput.c @@ -81,12 +81,12 @@ static BOOL poll_touchscreen(void) xerrno = errno; if ((xerrno != EAGAIN) && (xerrno != EWOULDBLOCK)) Log(LERROR, "Error reading from touchscreen device (%d)", xerrno); - return; + return FALSE; } else if (nb == 0) { Log(LERROR, "Unexpected end of file reading from touchscreen device"); - return; + return FALSE; } nev = nb / sizeof(struct input_event); @@ -207,6 +207,6 @@ void Sys_wait_for_input(void) { pthread_mutex_lock(&wait_mutex); while (Mq_is_empty(Sys_Queue)) - pthread_cond_wait(&wait_cond); + pthread_cond_wait(&wait_cond, &wait_mutex); pthread_mutex_unlock(&wait_mutex); }