summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-01-13 12:04:51 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-01-13 12:04:51 +0100
commita5a8bf0164a5b47ab7624346d346dafd623727a1 (patch)
tree54bbf85f6beb248c675fb5070a87d2f299fcc28a
parentd1d157d755669490d9b5ff65f015dc2a4ae10db7 (diff)
downloadvdr-a5a8bf0164a5b47ab7624346d346dafd623727a1.tar.gz
vdr-a5a8bf0164a5b47ab7624346d346dafd623727a1.tar.bz2
Added "repeat" function when using the keyboard to control VDR
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--remote.c15
3 files changed, 16 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 2ee44fdd..bb59d228 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1334,6 +1334,7 @@ Reinhard Nissl <rnissl@gmx.de>
for suggesting to add a remark indicating that the coordinates of Rect in a call to
cDevice::CanScaleVideo() are in the range of the width and height returned by
GetOsdSize()
+ for adding "repeat" function when using the keyboard to control VDR
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index 536e4008..685de9cd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7516,3 +7516,5 @@ Video Disk Recorder Revision History
- Fixed sorting recordings in case the locale ignores non-alphanumeric characters,
or if two folders have the same name, but one of them ends in an additional digit,
as in "abc" and "abc2" (reported by Andreas Mair).
+- Added "repeat" function when using the keyboard to control VDR (thanks to Reinhard
+ Nissl).
diff --git a/remote.c b/remote.c
index 0b2d66de..3f20d026 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 2.5 2012/01/16 16:57:00 kls Exp $
+ * $Id: remote.c 2.6 2013/01/13 12:01:52 kls Exp $
*/
#include "remote.h"
@@ -356,14 +356,25 @@ uint64_t cKbdRemote::ReadKeySequence(void)
void cKbdRemote::Action(void)
{
+ uint64_t LastCommand = 0;
+ bool Repeat = false;
+
while (Running()) {
uint64_t Command = ReadKeySequence();
+ if (LastCommand && Command != LastCommand && Repeat) {
+ if (!rawMode)
+ Put(LastCommand, false, true);
+ Repeat = false;
+ }
if (Command) {
- if (rawMode || !Put(Command)) {
+ if (Command == LastCommand)
+ Repeat = true;
+ if (rawMode || !Put(Command, Repeat)) {
int func = MapCodeToFunc(Command);
if (func)
Put(KBDKEY(func));
}
}
+ LastCommand = Command;
}
}