From 8ffd1073a2aa07b51dfb6fe8b0e4b1658e1c01f1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Jul 2019 01:22:37 +0200 Subject: m_config: remove m_config_create_shadow A previous commit changed m_config so that it always creates the shadow thing, and the function's only remaining purpose was to initialize mpv_global. It makes much more sense to do that at the caller, and it's only 1 line of code too. --- player/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index e1f3285984..04acf3cc72 100644 --- a/player/main.c +++ b/player/main.c @@ -296,13 +296,13 @@ struct MPContext *mp_create(void) mpctx->mconfig = m_config_new(mpctx, mpctx->log, sizeof(struct MPOpts), &mp_default_opts, mp_opts); mpctx->opts = mpctx->mconfig->optstruct; + mpctx->global->config = mpctx->mconfig->shadow; mpctx->mconfig->includefunc = cfg_include; mpctx->mconfig->includefunc_ctx = mpctx; mpctx->mconfig->use_profiles = true; mpctx->mconfig->is_toplevel = true; mpctx->mconfig->global = mpctx->global; m_config_parse(mpctx->mconfig, "", bstr0(def_config), NULL, 0); - m_config_create_shadow(mpctx->mconfig); mpctx->input = mp_input_init(mpctx->global, mp_wakeup_core_cb, mpctx); screenshot_init(mpctx); -- cgit v1.2.3