diff options
author | wm4 <wm4@nowhere> | 2019-11-29 00:16:52 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-29 12:14:43 +0100 |
commit | 1cb085a82e89ce4c9150871c910c75d9404d1e01 (patch) | |
tree | ab0fdbaa22568377a051aaef4740d5cf3656a543 /options/options.c | |
parent | 5083db91ebff2fa469d94520bd3e8e535da74b8d (diff) | |
download | mpv-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 'options/options.c')
-rw-r--r-- | options/options.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/options/options.c b/options/options.c index 6437dc81c5..ee226843c2 100644 --- a/options/options.c +++ b/options/options.c @@ -318,7 +318,7 @@ const struct m_sub_options filter_conf = { #undef OPT_BASE_STRUCT #define OPT_BASE_STRUCT struct MPOpts -const m_option_t mp_opts[] = { +static const m_option_t mp_opts[] = { // handled in command line pre-parser (parse_commandline.c) {"v", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_NOPROP, .offset = -1}, @@ -896,7 +896,7 @@ const m_option_t mp_opts[] = { {0} }; -const struct MPOpts mp_default_opts = { +static const struct MPOpts mp_default_opts = { .use_terminal = 1, .msg_color = 1, .audio_decoders = NULL, @@ -991,4 +991,10 @@ const struct MPOpts mp_default_opts = { .cuda_device = -1, }; +const struct m_sub_options mp_opt_root = { + .opts = mp_opts, + .size = sizeof(struct MPOpts), + .defaults = &mp_default_opts, +}; + #endif /* MPLAYER_CFG_MPLAYER_H */ |