diff options
author | filon <filon@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-02 21:22:50 +0000 |
---|---|---|
committer | filon <filon@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-01-02 21:22:50 +0000 |
commit | 6f6f3f24800a1ac9d052b3f27f89bf65300b8f7d (patch) | |
tree | 4813d660086d598f2718cc0e87a73746daf58fd5 | |
parent | 9ff22a4d69f1c9c803e9675a3bceee878999cb92 (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.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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 |