aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar filon <filon@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-02 21:22:50 +0000
committerGravatar filon <filon@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-02 21:22:50 +0000
commit6f6f3f24800a1ac9d052b3f27f89bf65300b8f7d (patch)
tree4813d660086d598f2718cc0e87a73746daf58fd5
parent9ff22a4d69f1c9c803e9675a3bceee878999cb92 (diff)
Use system-wide menu.conf file if nothing else is availible,
also always try first to fallback to user configuration file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8724 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--mplayer.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/mplayer.c b/mplayer.c
index 58bd9523c6..4b50cfb06a 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -968,12 +968,20 @@ current_module = NULL;
#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