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 /player/main.c | |
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 'player/main.c')
-rw-r--r-- | player/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/player/main.c b/player/main.c index d94b61230e..0a11bcf7d2 100644 --- a/player/main.c +++ b/player/main.c @@ -117,7 +117,7 @@ void mp_update_logging(struct MPContext *mpctx, bool preinit) { bool had_log_file = mp_msg_has_log_file(mpctx->global); - mp_msg_update_msglevels(mpctx->global); + mp_msg_update_msglevels(mpctx->global, mpctx->opts); bool enable = mpctx->opts->use_terminal; bool enabled = cas_terminal_owner(mpctx, mpctx); @@ -303,8 +303,6 @@ struct MPContext *mp_create(void) m_config_parse(mpctx->mconfig, "", bstr0(def_config), NULL, 0); m_config_create_shadow(mpctx->mconfig); - mpctx->global->opts = mpctx->opts; - mpctx->input = mp_input_init(mpctx->global, mp_wakeup_core_cb, mpctx); screenshot_init(mpctx); command_init(mpctx); @@ -335,8 +333,10 @@ int mp_initialize(struct MPContext *mpctx, char **options) assert(!mpctx->initialized); // Preparse the command line, so we can init the terminal early. - if (options) - m_config_preparse_command_line(mpctx->mconfig, mpctx->global, options); + if (options) { + m_config_preparse_command_line(mpctx->mconfig, mpctx->global, + &opts->verbose, options); + } mp_init_paths(mpctx->global, opts); mp_update_logging(mpctx, true); |