summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY6
-rw-r--r--interface.c4
-rw-r--r--remote.c10
-rw-r--r--remote.h3
5 files changed, 17 insertions, 10 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c7bd15c6..8578cd4a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1347,7 +1347,7 @@ Udo Richter <udo_richter@gmx.de>
no longer exists
for reporting a missing check against MAXOSDAREAS in cOsd::CanHandleAreas()
for making the Makefile report a summary of failed plugins
- for reporting a problem with the new handling of k_Repeat keypresses in channel
+ for reporting a problem with the new handling of k_Repeat keypresses in channel
switching
Sven Kreiensen <svenk@kammer.uni-hannover.de>
@@ -1465,6 +1465,8 @@ Luca Olivetti <luca@ventoso.org>
for making cDevice::AttachPlayer() keep the track language codes and descriptions
in Transfer Mode
for suggesting to make the "Menu" key behave consistently
+ for suggesting to implement a timeout for remote controls that don't deliver
+ "repeat" keypresses very fast
Mikko Salo <mikko.salo@ppe.inet.fi>
for suggesting to make the setup option "DVB/Video display format" available only
diff --git a/HISTORY b/HISTORY
index ec343721..9fa84f6a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4248,9 +4248,6 @@ Video Disk Recorder Revision History
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Fixed channel switching with the Down (Up) key in case the current channel is
already the first (last) in the list (reported by Frank Krömmelbein).
-- Increased the timeout in cInterface::GetKey() to avoid problems with remote
- controls that don't deliver "repeat" keypresses very fast (problem with the new
- handling of k_Repeat keypresses in channel switching reported by Udo Richter).
- Removed the "buffer reserve" in Transfer Mode - it's no longer necessary with
recent driver/firmware versions.
- The epg.data file is now written when VDR exits (suggested by Daniel Karsubka).
@@ -4263,3 +4260,6 @@ Video Disk Recorder Revision History
- When reading epg.data (or data from PUTE), the version number of events with
table IDs smaller than 0x50 is now ignored because otherwise the current
running status would not be set after a restart of VDR.
+- Implemented a timeout for remote controls that don't deliver "repeat" keypresses
+ very fast (based on a suggestion by Luca Olivetti; problem with the new handling
+ of k_Repeat keypresses in channel switching reported by Udo Richter).
diff --git a/interface.c b/interface.c
index afe756b9..4b74db95 100644
--- a/interface.c
+++ b/interface.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: interface.c 1.72 2006/01/28 12:44:34 kls Exp $
+ * $Id: interface.c 1.73 2006/01/29 12:35:50 kls Exp $
*/
#include "interface.h"
@@ -37,7 +37,7 @@ eKeys cInterface::GetKey(bool Wait)
if (SVDRP->Process())
Wait = false;
}
- return cRemote::Get(Wait ? 1000 : 100);
+ return cRemote::Get(Wait ? 1000 : 10);
}
eKeys cInterface::Wait(int Seconds, bool KeepChar)
diff --git a/remote.c b/remote.c
index f9338936..1687d018 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 1.48 2006/01/15 15:00:00 kls Exp $
+ * $Id: remote.c 1.49 2006/01/29 12:27:08 kls Exp $
*/
#include "remote.h"
@@ -18,11 +18,13 @@
// --- cRemote ---------------------------------------------------------------
-#define INITTIMEOUT 10000 // ms
+#define INITTIMEOUT 10000 // ms
+#define REPEATTIMEOUT 1000 // ms
eKeys cRemote::keys[MaxKeys];
int cRemote::in = 0;
int cRemote::out = 0;
+cTimeMs cRemote::repeatTimeout;
cRemote *cRemote::learning = NULL;
char *cRemote::unknownCode = NULL;
cMutex cRemote::mutex;
@@ -163,9 +165,11 @@ eKeys cRemote::Get(int WaitMs, char **UnknownCode)
eKeys k = keys[out];
if (++out >= MaxKeys)
out = 0;
+ if ((k & k_Repeat) != 0)
+ repeatTimeout.Set(REPEATTIMEOUT);
return k;
}
- else if (!WaitMs || !keyPressed.TimedWait(mutex, WaitMs)) {
+ else if (!WaitMs || !keyPressed.TimedWait(mutex, WaitMs) && repeatTimeout.TimedOut()) {
if (learning && UnknownCode) {
*UnknownCode = unknownCode;
unknownCode = NULL;
diff --git a/remote.h b/remote.h
index 4fd26d8e..0213b0cf 100644
--- a/remote.h
+++ b/remote.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remote.h 1.32 2006/01/01 14:00:50 kls Exp $
+ * $Id: remote.h 1.33 2006/01/29 12:27:08 kls Exp $
*/
#ifndef __REMOTE_H
@@ -23,6 +23,7 @@ private:
static eKeys keys[MaxKeys];
static int in;
static int out;
+ static cTimeMs repeatTimeout;
static cRemote *learning;
static char *unknownCode;
static cMutex mutex;