diff options
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; } } |