1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling repeat function for keyboards

This commit is contained in:
Klaus Schmidinger 2019-05-13 13:41:29 +02:00
parent 6f95a495ab
commit 12d8ef5a21
2 changed files with 9 additions and 3 deletions

View File

@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History
Senzel).
- Official release.
2019-05-07: Version 2.4.1
2019-05-13: Version 2.4.1
- Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported
by Johann Friedrichs).
@ -9404,3 +9404,4 @@ Video Disk Recorder Revision History
- Fixed handling remote timers in case the response to LSTT is '550 No timers defined'.
- Fixed a compiler warning in cIndexFile::ConvertToPes() and added __attribute__((packed))
to tIndexPes and tIndexTs (suggested by Helmut Binder).
- Fixed handling repeat function for keyboards.

View File

@ -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;
}
}