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 /common/msg.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 'common/msg.c')
-rw-r--r-- | common/msg.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/common/msg.c b/common/msg.c index b8e89bec31..cb41ea4168 100644 --- a/common/msg.c +++ b/common/msg.c @@ -460,8 +460,6 @@ void mp_msg_init(struct mpv_global *global) struct mp_log *log = mp_log_new(root, &dummy, ""); global->log = log; - - mp_msg_update_msglevels(global); } // If opt is different from *current_path, reopen *file and update *current_path. @@ -501,13 +499,9 @@ static void reopen_file(char *opt, char **current_path, FILE **file, talloc_free(tmp); } -void mp_msg_update_msglevels(struct mpv_global *global) +void mp_msg_update_msglevels(struct mpv_global *global, struct MPOpts *opts) { struct mp_log_root *root = global->log->root; - struct MPOpts *opts = global->opts; - - if (!opts) - return; pthread_mutex_lock(&mp_msg_lock); @@ -522,8 +516,7 @@ void mp_msg_update_msglevels(struct mpv_global *global) } m_option_type_msglevels.free(&root->msg_levels); - m_option_type_msglevels.copy(NULL, &root->msg_levels, - &global->opts->msg_levels); + m_option_type_msglevels.copy(NULL, &root->msg_levels, &opts->msg_levels); atomic_fetch_add(&root->reload_counter, 1); pthread_mutex_unlock(&mp_msg_lock); |