summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2019-05-13 13:41:29 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2019-05-13 13:41:29 +0200
commit12d8ef5a21d73ae0b7e656d2dd8f9ead5177bf56 (patch)
treeae25a7768ff087c261df839cd31f2bc36e48c689 /remote.c
parent6f95a495ab5ca6c5fe6a9695b762d250795fce54 (diff)
downloadvdr-12d8ef5a21d73ae0b7e656d2dd8f9ead5177bf56.tar.gz
vdr-12d8ef5a21d73ae0b7e656d2dd8f9ead5177bf56.tar.bz2
Fixed handling repeat function for keyboards
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/remote.c b/remote.c
index ac10dce7..cc802442 100644
--- a/remote.c
+++ b/remote.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remote.c 3.3 2015/01/20 14:53:57 kls Exp $
+ * $Id: remote.c 4.1 2019/05/13 13:01:44 kls Exp $
*/
#include "remote.h"
@@ -307,7 +307,7 @@ void cKbdRemote::PutKey(uint64_t Code, bool Repeat, bool Release)
int cKbdRemote::ReadKey(void)
{
cPoller Poller(STDIN_FILENO);
- if (Poller.Poll(50)) {
+ if (Poller.Poll(Setup.RcRepeatDelta * 3 / 2)) {
uchar ch = 0;
int r = safe_read(STDIN_FILENO, &ch, 1);
if (r == 1)
@@ -431,6 +431,11 @@ void cKbdRemote::Action(void)
FirstCommand = 0;
FirstTime.Set();
}
+ else if (FirstCommand && FirstTime.Elapsed() > (uint)Setup.RcRepeatDelay) {
+ // Don't wait too long for that second key press:
+ Delayed = false;
+ FirstCommand = 0;
+ }
LastCommand = Command;
}
}