From f8ab59eacdde31af39f4defeb964adf4de140a50 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 21 May 2018 16:25:52 +0200 Subject: 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. --- player/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'player/main.c') 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); -- cgit v1.2.3