summaryrefslogtreecommitdiff
path: root/lirc.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-06 15:46:06 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-06 15:46:06 +0200
commitc30aeec7165ed63bc2f30ee0d85b15f4a83df005 (patch)
tree9b0f9e11a16dfd07268f6821f00a69843897dace /lirc.c
parent2a7dd5e67d621a2079b6bbbe47b3a4b6bba8a42b (diff)
downloadvdr-c30aeec7165ed63bc2f30ee0d85b15f4a83df005.tar.gz
vdr-c30aeec7165ed63bc2f30ee0d85b15f4a83df005.tar.bz2
Fixed handling repeat function with LIRC
Diffstat (limited to 'lirc.c')
-rw-r--r--lirc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lirc.c b/lirc.c
index d1fd95be..2c92f6ab 100644
--- a/lirc.c
+++ b/lirc.c
@@ -6,7 +6,7 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
- * $Id: lirc.c 1.2 2003/04/06 15:39:48 kls Exp $
+ * $Id: lirc.c 1.3 2003/04/06 15:45:10 kls Exp $
*/
#include "lirc.h"
@@ -71,6 +71,8 @@ void cLircRemote::Action(void)
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
int Now = time_ms();
if (count == 0) {
+ if (repeat)
+ Put(LastKeyName, false, true);
strcpy(LastKeyName, KeyName);
repeat = false;
FirstTime = Now;
@@ -86,7 +88,7 @@ void cLircRemote::Action(void)
Put(KeyName, repeat);
}
else if (repeat) { // the last one was a repeat, so let's generate a release
- if (time_ms() - LastTime > REPEATDELAY) {
+ if (time_ms() - LastTime >= REPEATDELAY) {
Put(LastKeyName, false, true);
repeat = false;
*LastKeyName = 0;