changeset 8723:48a2c2545d5c

Use system-wide menu.conf file if nothing else is availible, also always try first to fallback to user configuration file.
author filon
date Thu, 02 Jan 2003 21:22:50 +0000
parents 86c0d90cd841
children d19eb334c0d4
files mplayer.c
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Thu Jan 02 18:54:16 2003 +0000
+++ b/mplayer.c	Thu Jan 02 21:22:50 2003 +0000
@@ -968,12 +968,20 @@
 
 #ifdef HAVE_MENU
  if(use_menu) {
-   if(!menu_cfg) menu_cfg = get_path("menu.conf");
-   if(menu_init(menu_cfg))
-     mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited\n");
+   if(menu_cfg && menu_init(menu_cfg))
+     mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", menu_cfg);
    else {
-     mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu init failed\n");
-     use_menu = 0;
+     menu_cfg = get_path("menu.conf");
+     if(menu_init(menu_cfg))
+       mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", menu_cfg);
+     else {
+       if(menu_init(CONFDIR"/menu.conf"))
+         mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", CONFDIR"/menu.conf");
+       else {
+         mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu init failed\n");
+         use_menu = 0;
+       }
+     }
    }
  }
 #endif