diff options
author | wm4 <wm4@nowhere> | 2015-02-15 14:28:49 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-15 14:28:49 +0100 |
commit | a27aa68dd33c613218d261b14ef1cf763abc1c33 (patch) | |
tree | f7196b53f45b0f7875d6cecdde879c61fb97b594 /player | |
parent | cf073138b289243fb551242f8058a4f8490cc9af (diff) | |
download | mpv-a27aa68dd33c613218d261b14ef1cf763abc1c33.tar.bz2 mpv-a27aa68dd33c613218d261b14ef1cf763abc1c33.tar.xz |
player: undeprecate 'config' files
Actually, it's pretty simple to look for multiple filenames at once,
since mp_find_all_config_files() is already a bit "special" anyway.
See #1569. Reverts most of commit db167cd4 (keeps osx-bundle.conf).
Diffstat (limited to 'player')
-rw-r--r-- | player/configfiles.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/player/configfiles.c b/player/configfiles.c index 466f248b04..463d1a4f41 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -46,29 +46,13 @@ #include "core.h" #include "command.h" -static int load_all_cfgfiles(struct MPContext *mpctx, char *section, - char *filename, bool bork) +static void load_all_cfgfiles(struct MPContext *mpctx, char *section, + char *filename) { char **cf = mp_find_all_config_files(NULL, mpctx->global, filename); - int count = 0; - for (int i = 0; cf && cf[i]; i++) { - if (strcmp(filename, "config") == 0) { - MP_WARN(mpctx, "Loading %s - naming the mpv config files 'config' is " - "deprecated. Please rename it to 'mpv.conf'\n", cf[i]); - } - if (bork) { - MP_WARN(mpctx, "Warning: your system has a 'mpv.conf' somewhere " - "(check with -v), which will shadow 'config'. This " - "is probably unintended, and you should not mix " - "'config' and 'mpv.conf' files.\n" - "Just rename this file to mpv.conf.\n"); - bork = false; - } + for (int i = 0; cf && cf[i]; i++) m_config_parse_config_file(mpctx->mconfig, cf[i], section, 0); - count++; - } talloc_free(cf); - return count; } #define SECT_ENCODE "encoding" @@ -103,11 +87,10 @@ void mp_parse_cfgfiles(struct MPContext *mpctx) // Stupid hack to set OSX bundle defaults, if applicable. (The file is only // found if starting from the OSX bundle.) #if HAVE_COCOA - load_all_cfgfiles(mpctx, section, "osx-bundle.conf", false); + load_all_cfgfiles(mpctx, section, "osx-bundle.conf"); #endif - int count = load_all_cfgfiles(mpctx, section, "mpv.conf", false); - load_all_cfgfiles(mpctx, section, "config", count > 0); + load_all_cfgfiles(mpctx, section, "mpv.conf|config"); if (encoding) m_config_set_profile(conf, m_config_add_profile(conf, SECT_ENCODE), 0); |