summaryrefslogtreecommitdiff
path: root/src/xf86Elo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xf86Elo.c')
-rw-r--r--src/xf86Elo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/xf86Elo.c b/src/xf86Elo.c
index c107927..ef8cb2f 100644
--- a/src/xf86Elo.c
+++ b/src/xf86Elo.c
@@ -807,10 +807,13 @@ xf86EloReadInput(LocalDevicePtr local)
/*
* Try to get a packet.
*/
- while (xf86EloGetPacket(priv->packet_buf,
+ while (xf86WaitForInput(local->fd, ELO_MAX_WAIT) > 0) {
+ if(xf86EloGetPacket(priv->packet_buf,
&priv->packet_buf_p,
&priv->checksum,
- local->fd) == Success) {
+ local->fd) != Success)
+ break;
+
/*
* Process only ELO_TOUCHs here.
*/