diff options
author | wm4 <wm4@nowhere> | 2018-05-21 16:25:52 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:35 +0200 |
commit | f8ab59eacdde31af39f4defeb964adf4de140a50 (patch) | |
tree | c353dede917a1f371a02e848f174aa4e541ffe97 /options | |
parent | a770006c6ec1c0173e33a63d36cafca743e63808 (diff) | |
download | mpv-f8ab59eacdde31af39f4defeb964adf4de140a50.tar.bz2 mpv-f8ab59eacdde31af39f4defeb964adf4de140a50.tar.xz |
player: get rid of mpv_global.opts
This was always a legacy thing. Remove it by applying an orgy of
mp_get_config_group() calls, and sometimes m_config_cache_alloc() or
mp_read_option_raw().
win32 changes untested.
Diffstat (limited to 'options')
-rw-r--r-- | options/parse_commandline.c | 6 | ||||
-rw-r--r-- | options/parse_commandline.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/options/parse_commandline.c b/options/parse_commandline.c index 68d36c6500..d2eb01966c 100644 --- a/options/parse_commandline.c +++ b/options/parse_commandline.c @@ -281,10 +281,8 @@ err_out: * during normal options parsing. */ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *global, - char **argv) + int *verbose, char **argv) { - struct MPOpts *opts = global->opts; - struct parse_state p = {config, argv}; while (split_opt_silent(&p) == 0) { if (p.is_opt) { @@ -293,7 +291,7 @@ void m_config_preparse_command_line(m_config_t *config, struct mpv_global *globa int flags = M_SETOPT_FROM_CMDLINE | M_SETOPT_PRE_PARSE_ONLY; m_config_set_option_cli(config, p.arg, p.param, flags); if (bstrcmp0(p.arg, "v") == 0) - opts->verbose++; + (*verbose)++; } } diff --git a/options/parse_commandline.h b/options/parse_commandline.h index 8c39047814..1509fc94e2 100644 --- a/options/parse_commandline.h +++ b/options/parse_commandline.h @@ -27,6 +27,6 @@ struct mpv_global; int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, struct mpv_global *global, char **argv); void m_config_preparse_command_line(m_config_t *config, struct mpv_global *global, - char **argv); + int *verbose, char **argv); #endif /* MPLAYER_PARSER_MPCMD_H */ |