[Mplayer-cvslog] CVS: main mplayer.c,1.641,1.642

Filip Kalinski CVS filon at mplayerhq.hu
Thu Jan 2 22:23:05 CET 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv9097

Modified Files:
	mplayer.c 
Log Message:
Use system-wide menu.conf file if nothing else is availible,
also always try first to fallback to user configuration file.


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.641
retrieving revision 1.642
diff -u -r1.641 -r1.642
--- mplayer.c	31 Dec 2002 02:26:32 -0000	1.641
+++ mplayer.c	2 Jan 2003 21:22:50 -0000	1.642
@@ -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



More information about the MPlayer-cvslog mailing list