mirror of
https://github.com/mpv-player/mpv
synced 2025-01-04 05:52:09 +00:00
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
This commit is contained in:
parent
9ff22a4d69
commit
6f6f3f2480
18
mplayer.c
18
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
|
||||
|
Loading…
Reference in New Issue
Block a user