From 0e339fc397e7238ad8d31a8f2e8ae86f63c22959 Mon Sep 17 00:00:00 2001 From: faust3 Date: Wed, 15 Sep 2004 13:37:49 +0000 Subject: [PATCH] option to display menu at startup, patch by Aurelien Jacobs git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13345 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-mplayer.h | 5 +++++ libmenu/vf_menu.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/cfg-mplayer.h b/cfg-mplayer.h index b0498a4552..a7d5e695e7 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -82,6 +82,10 @@ extern int vo_nomouse_input; 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 @@ m_option_t mplayer_opts[]={ {"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 diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c index 8ef88a1d6d..3269d07e7f 100644 --- a/libmenu/vf_menu.c +++ b/libmenu/vf_menu.c @@ -29,6 +29,8 @@ static struct vf_priv_s* st_priv = NULL; 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 @@ static int open(vf_instance_t *vf, char* args){ st_priv = NULL; return 0; } + st_priv->root->show = menu_startup; mp_input_add_cmd_filter((mp_input_cmd_filter)cmd_filter,st_priv); }