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:
parent
6f95a495ab
commit
12d8ef5a21
3
HISTORY
3
HISTORY
@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History
|
|||||||
Senzel).
|
Senzel).
|
||||||
- Official release.
|
- 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
|
- Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported
|
||||||
by Johann Friedrichs).
|
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 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))
|
- Fixed a compiler warning in cIndexFile::ConvertToPes() and added __attribute__((packed))
|
||||||
to tIndexPes and tIndexTs (suggested by Helmut Binder).
|
to tIndexPes and tIndexTs (suggested by Helmut Binder).
|
||||||
|
- Fixed handling repeat function for keyboards.
|
||||||
|
9
remote.c
9
remote.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "remote.h"
|
||||||
@ -307,7 +307,7 @@ void cKbdRemote::PutKey(uint64_t Code, bool Repeat, bool Release)
|
|||||||
int cKbdRemote::ReadKey(void)
|
int cKbdRemote::ReadKey(void)
|
||||||
{
|
{
|
||||||
cPoller Poller(STDIN_FILENO);
|
cPoller Poller(STDIN_FILENO);
|
||||||
if (Poller.Poll(50)) {
|
if (Poller.Poll(Setup.RcRepeatDelta * 3 / 2)) {
|
||||||
uchar ch = 0;
|
uchar ch = 0;
|
||||||
int r = safe_read(STDIN_FILENO, &ch, 1);
|
int r = safe_read(STDIN_FILENO, &ch, 1);
|
||||||
if (r == 1)
|
if (r == 1)
|
||||||
@ -431,6 +431,11 @@ void cKbdRemote::Action(void)
|
|||||||
FirstCommand = 0;
|
FirstCommand = 0;
|
||||||
FirstTime.Set();
|
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;
|
LastCommand = Command;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user