diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-05-02 10:54:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-05-02 10:54:00 +0200 |
commit | 03a4a3a6182ca2b34163ba8b3de7728d0aca0b7a (patch) | |
tree | c9172a90572f12eef43ad7f3fef86cb14d5fa0d6 | |
parent | 240529710db31cd5a96ad2fdb7f9fd486ec7939f (diff) | |
download | vdr-03a4a3a6182ca2b34163ba8b3de7728d0aca0b7a.tar.gz vdr-03a4a3a6182ca2b34163ba8b3de7728d0aca0b7a.tar.bz2 |
Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey
-rw-r--r-- | CONTRIBUTORS | 3 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | osd.c | 5 | ||||
-rw-r--r-- | remote.c | 17 | ||||
-rw-r--r-- | remote.h | 4 |
5 files changed, 22 insertions, 9 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e43c739c..da92b79f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -624,3 +624,6 @@ Andreas Mair <Andreas.Mair@linogate.com> Olivier Jacques <jacquesolivier@hotmail.com>) for translating OSD texts to the French language + +Kai Moeller <moeller.ki@gmx.de> + for reporting a double call to MainMenuAction() of a plugin if invoked via a hotkey @@ -2092,3 +2092,5 @@ Video Disk Recorder Revision History - Fixed paging through lists with repeated Left/Right keys. - Fixed setting the PCR-PID in case it is equal to one of the other PIDs (thanks to Oliver Endriss for reporting this one). +- Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey (thanks + to Kai Moeller for reporting this one). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.40 2003/03/23 15:41:54 kls Exp $ + * $Id: osd.c 1.41 2003/05/02 10:46:13 kls Exp $ */ #include "osd.h" @@ -578,7 +578,8 @@ eOSState cOsdMenu::HotKey(eKeys Key) if (s && (s = skipspace(s)) != NULL) { if (*s == Key - k1 + '1') { current = item->Index(); - return ProcessKey(kOk); + cRemote::Put(kOk, true); + break; } } } @@ -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; } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.h 1.27 2003/05/01 14:45:00 kls Exp $ + * $Id: remote.h 1.28 2003/05/02 10:41:35 kls Exp $ */ #ifndef __REMOTE_H @@ -42,7 +42,7 @@ public: const char *Name(void) { return name; } static void SetLearning(cRemote *Learning) { learning = Learning; } static void Clear(void); - static bool Put(eKeys Key); + static bool Put(eKeys Key, bool AtFront = false); static bool PutMacro(eKeys Key); static const char *GetPlugin(void) { return plugin; } static bool HasKeys(void); |