From 8bb3fffa5e370d208e034e5f798c1bd7ac9fc1c1 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 29 Jul 2000 16:23:47 +0200 Subject: Bugfix in PC keyboard learning process --- remote.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/remote.c b/remote.c index 931cfd33..0476962c 100644 --- a/remote.c +++ b/remote.c @@ -6,7 +6,7 @@ * * Ported to LIRC by Carsten Koch 2000-06-16. * - * $Id: remote.c 1.10 2000/07/15 16:34:35 kls Exp $ + * $Id: remote.c 1.11 2000/07/29 16:23:47 kls Exp $ */ #include "remote.h" @@ -71,7 +71,11 @@ void cRcIoKBD::Flush(int WaitSeconds) bool cRcIoKBD::InputAvailable(bool Wait) { timeout(Wait ? 1000 : 10); - return true;//XXX + int ch = getch(); + if (ch == ERR) + return false; + ungetch(ch); + return true; } bool cRcIoKBD::GetCommand(unsigned int *Command, unsigned short *) -- cgit v1.2.3