summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-13 15:45:02 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-13 15:45:02 +0100
commit317b15f5a06007ebe6f475c6700424ae9d07d1c1 (patch)
tree8a6fe870ec735b9990bc0ad4c47a0498d461a912 /vdr.c
parentff88f3bfedfae42a394a8447657554d3ce4eb8fd (diff)
downloadvdr-317b15f5a06007ebe6f475c6700424ae9d07d1c1.tar.gz
vdr-317b15f5a06007ebe6f475c6700424ae9d07d1c1.tar.bz2
Implemented the option "Setup/OSD/Menu button closes"
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vdr.c b/vdr.c
index c8afec24..5d387909 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.234 2006/01/09 16:44:15 kls Exp $
+ * $Id: vdr.c 1.235 2006/01/13 15:33:54 kls Exp $
*/
#include <getopt.h>
@@ -787,14 +787,17 @@ int main(int argc, char *argv[])
// Keys that must work independent of any interactive mode:
switch (key) {
// Menu control:
- case kMenu:
+ case kMenu: {
key = kNone; // nobody else needs to see this key
+ bool WasOpen = Interact != NULL;
+ bool WasMenu = Interact && Interact->IsMenu();
if (Menu)
DELETE_MENU;
else if (cControl::Control() && cOsd::IsOpen())
cControl::Control()->Hide();
- else
+ if (!WasOpen || !WasMenu && !Setup.MenuButtonCloses)
Menu = new cMenuMain;
+ }
break;
// Info:
case kInfo: {