summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--input/input.c2
-rw-r--r--options/options.c2
-rw-r--r--options/path.c4
-rw-r--r--player/configfiles.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/input/input.c b/input/input.c
index c22ece8203..5b3370736a 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1229,7 +1229,7 @@ void mp_input_load(struct input_ctx *ictx)
bool config_ok = false;
if (input_conf->config_file)
config_ok = parse_config_file(ictx, input_conf->config_file, true);
- if (!config_ok && ictx->global->opts->load_config) {
+ if (!config_ok) {
// Try global conf dir
void *tmp = talloc_new(NULL);
char **files = mp_find_all_config_files(tmp, ictx->global, "input.conf");
diff --git a/options/options.c b/options/options.c
index 71aea336b1..45f4217a2e 100644
--- a/options/options.c
+++ b/options/options.c
@@ -132,7 +132,7 @@ const m_option_t mp_opts[] = {
{"belownormal", BELOW_NORMAL_PRIORITY_CLASS},
{"idle", IDLE_PRIORITY_CLASS})),
#endif
- OPT_FLAG("config", load_config, CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE),
+ OPT_FLAG("config", load_config, CONF_GLOBAL | CONF_PRE_PARSE),
OPT_STRING("config-dir", force_configdir,
CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE),
OPT_STRINGLIST("reset-on-next-file", reset_options, M_OPT_GLOBAL),
diff --git a/options/path.c b/options/path.c
index 08d16fe944..29ebcd9277 100644
--- a/options/path.c
+++ b/options/path.c
@@ -76,10 +76,12 @@ static const char *mp_get_platform_path(void *talloc_ctx,
const char *force_configdir = getenv("MPV_HOME");
if (global->opts->force_configdir && global->opts->force_configdir[0])
force_configdir = global->opts->force_configdir;
+ if (!global->opts->load_config)
+ force_configdir = "";
if (force_configdir) {
for (int n = 0; n < MP_ARRAY_SIZE(config_dirs); n++) {
if (strcmp(config_dirs[n], type) == 0)
- return n == 0 ? force_configdir : NULL;
+ return (n == 0 && force_configdir[0]) ? force_configdir : NULL;
}
}
diff --git a/player/configfiles.c b/player/configfiles.c
index 44b811f20e..29acdda6b9 100644
--- a/player/configfiles.c
+++ b/player/configfiles.c
@@ -59,8 +59,6 @@ static void load_all_cfgfiles(struct MPContext *mpctx, char *section,
void mp_parse_cfgfiles(struct MPContext *mpctx)
{
struct MPOpts *opts = mpctx->opts;
- if (!opts->load_config)
- return;
mp_mk_config_dir(mpctx->global, "");