summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-05-02 10:54:00 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-05-02 10:54:00 +0200
commit03a4a3a6182ca2b34163ba8b3de7728d0aca0b7a (patch)
treec9172a90572f12eef43ad7f3fef86cb14d5fa0d6 /remote.c
parent240529710db31cd5a96ad2fdb7f9fd486ec7939f (diff)
downloadvdr-03a4a3a6182ca2b34163ba8b3de7728d0aca0b7a.tar.gz
vdr-03a4a3a6182ca2b34163ba8b3de7728d0aca0b7a.tar.bz2
Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/remote.c b/remote.c
index 80d77ed3..1b73d168 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.37 2003/05/01 14:44:55 kls Exp $
+ * $Id: remote.c 1.38 2003/05/02 10:49:50 kls Exp $
*/
#include "remote.h"
@@ -58,7 +58,7 @@ void cRemote::Clear(void)
}
}
-bool cRemote::Put(eKeys Key)
+bool cRemote::Put(eKeys Key, bool AtFront)
{
if (Key != kNone) {
cMutexLock MutexLock(&mutex);
@@ -68,9 +68,16 @@ bool cRemote::Put(eKeys Key)
if (d <= 0)
d = MaxKeys + d;
if (d - 1 > 0) {
- keys[in] = Key;
- if (++in >= MaxKeys)
- in = 0;
+ if (AtFront) {
+ if (--out < 0)
+ out = MaxKeys - 1;
+ keys[out] = Key;
+ }
+ else {
+ keys[in] = Key;
+ if (++in >= MaxKeys)
+ in = 0;
+ }
keyPressed.Broadcast();
return true;
}