changeset 13344:0d96af97ec00

option to display menu at startup, patch by Aurelien Jacobs <aurel at gnuage.org>
author faust3
date Wed, 15 Sep 2004 13:37:49 +0000
parents 1a4b6e575484
children fec54060c91f
files cfg-mplayer.h libmenu/vf_menu.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mplayer.h	Wed Sep 15 13:16:52 2004 +0000
+++ b/cfg-mplayer.h	Wed Sep 15 13:37:49 2004 +0000
@@ -82,6 +82,10 @@
 extern int WinID;
 #endif
 
+#ifdef HAVE_MENU
+extern int menu_startup;
+#endif
+
 #ifdef HAVE_AA
 extern int vo_aa_parseoption(m_option_t* conf, char *opt, char * param);
 extern void vo_aa_revertoption(m_option_t* opt,char* param);
@@ -331,6 +335,7 @@
 	{"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 	{"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 	{"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+	{"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
 #else
 	{"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
 #endif
--- a/libmenu/vf_menu.c	Wed Sep 15 13:16:52 2004 +0000
+++ b/libmenu/vf_menu.c	Wed Sep 15 13:37:49 2004 +0000
@@ -29,6 +29,8 @@
 
 static mp_image_t* pause_mpi = NULL;
 static int go2pause = 0;
+/// if nonzero display menu at startup
+int menu_startup = 0;
 
 struct vf_priv_s {
   menu_t* root;
@@ -260,6 +262,7 @@
       st_priv = NULL;
       return 0;
     }
+    st_priv->root->show = menu_startup;
     mp_input_add_cmd_filter((mp_input_cmd_filter)cmd_filter,st_priv);
   }