summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-29 00:16:52 +0100
committerwm4 <wm4@nowhere>2019-11-29 12:14:43 +0100
commit1cb085a82e89ce4c9150871c910c75d9404d1e01 (patch)
treeab0fdbaa22568377a051aaef4740d5cf3656a543 /player/main.c
parent5083db91ebff2fa469d94520bd3e8e535da74b8d (diff)
downloadmpv-1cb085a82e89ce4c9150871c910c75d9404d1e01.tar.bz2
mpv-1cb085a82e89ce4c9150871c910c75d9404d1e01.tar.xz
options: get rid of GLOBAL_CONFIG hack
Just an implementation detail that can be cleaned up now. Internally, m_config maintains a tree of m_sub_options structs, except for the root it was not defined explicitly. GLOBAL_CONFIG was a hack to get access to it anyway. Define it explicitly instead.
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/player/main.c b/player/main.c
index 3f39dad04c..f4c7348af4 100644
--- a/player/main.c
+++ b/player/main.c
@@ -296,8 +296,7 @@ struct MPContext *mp_create(void)
mpctx->statusline = mp_log_new(mpctx, mpctx->log, "!statusline");
// Create the config context and register the options
- mpctx->mconfig = m_config_new(mpctx, mpctx->log, sizeof(struct MPOpts),
- &mp_default_opts, mp_opts);
+ mpctx->mconfig = m_config_new(mpctx, mpctx->log, &mp_opt_root);
mpctx->opts = mpctx->mconfig->optstruct;
mpctx->global->config = mpctx->mconfig->shadow;
mpctx->mconfig->includefunc = cfg_include;