diff mplayer.c @ 22284:83366c8e1928

Fix menu to work with mpctx
author uau
date Wed, 21 Feb 2007 18:28:48 +0000
parents f00e6b43e79f
children 5d12a6e96930
line wrap: on
line diff
--- a/mplayer.c	Wed Feb 21 10:05:46 2007 +0000
+++ b/mplayer.c	Wed Feb 21 18:28:48 2007 +0000
@@ -381,6 +381,16 @@
 
 #define mp_basename2(s) (strrchr(s,'/')==NULL?(char*)s:(strrchr(s,'/')+1))
 
+void *mpctx_get_video_out(MPContext *mpctx)
+{
+    return mpctx->video_out;
+}
+
+void *mpctx_get_playtree_iter(MPContext *mpctx)
+{
+    return mpctx->playtree_iter;
+}
+
 static int is_valid_metadata_type (metadata_t type) {
   switch (type)
   {
@@ -2485,14 +2495,14 @@
 
 #ifdef HAVE_MENU
  if(use_menu) {
-   if(menu_cfg && menu_init(menu_cfg))
+   if(menu_cfg && menu_init(mpctx, menu_cfg))
      mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg);
    else {
      menu_cfg = get_path("menu.conf");
-     if(menu_init(menu_cfg))
+     if(menu_init(mpctx, menu_cfg))
        mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg);
      else {
-       if(menu_init(MPLAYER_CONFDIR "/menu.conf"))
+       if(menu_init(mpctx, MPLAYER_CONFDIR "/menu.conf"))
          mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, MPLAYER_CONFDIR"/menu.conf");
        else {
          mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitFailed);