summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-04 15:44:37 +0100
committerwm4 <wm4@nowhere>2015-11-04 21:49:54 +0100
commit3ad03f6673b3b1e56020994f90c8cde9f8932b6c (patch)
treeca0b6c4c1bdd55f7ba826d6cdf60931e4d836400 /options/options.c
parentf00edfd9c57367478927cb58adbbc21e3d62e237 (diff)
downloadmpv-3ad03f6673b3b1e56020994f90c8cde9f8932b6c.tar.bz2
mpv-3ad03f6673b3b1e56020994f90c8cde9f8932b6c.tar.xz
options: handle terminal/logging settings eagerly
Update msg.c state immediately if a terminal or logging setting is set. Until now, this was delayed until mp[v]_initialize() was called. When using the client API, you could easily miss logged error messages, even when logging was initialized early on by calling mpv_request_log_messages(). (Properties can't be used for this either, because properties do not work before mpv_initialize().)
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/options/options.c b/options/options.c
index 45c1b0e277..21ed2f4415 100644
--- a/options/options.c
+++ b/options/options.c
@@ -113,14 +113,14 @@ const m_option_t mp_opts[] = {
// ------------------------- common options --------------------
OPT_FLAG("quiet", quiet, CONF_GLOBAL),
OPT_FLAG_STORE("really-quiet", verbose, CONF_GLOBAL | CONF_PRE_PARSE, -10),
- OPT_FLAG("terminal", use_terminal, CONF_GLOBAL | CONF_PRE_PARSE),
- OPT_GENERAL(char**, "msg-level", msg_levels, CONF_GLOBAL|CONF_PRE_PARSE,
- .type = &m_option_type_msglevels),
+ OPT_FLAG("terminal", use_terminal, CONF_GLOBAL | CONF_PRE_PARSE | M_OPT_TERM),
+ OPT_GENERAL(char**, "msg-level", msg_levels, CONF_GLOBAL|CONF_PRE_PARSE |
+ M_OPT_TERM, .type = &m_option_type_msglevels),
OPT_STRING("dump-stats", dump_stats, CONF_GLOBAL | CONF_PRE_PARSE),
- OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE),
+ OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE | M_OPT_TERM),
OPT_STRING("log-file", log_file, CONF_GLOBAL | CONF_PRE_PARSE | M_OPT_FILE),
- OPT_FLAG("msg-module", msg_module, CONF_GLOBAL),
- OPT_FLAG("msg-time", msg_time, CONF_GLOBAL),
+ OPT_FLAG("msg-module", msg_module, CONF_GLOBAL | M_OPT_TERM),
+ OPT_FLAG("msg-time", msg_time, CONF_GLOBAL | M_OPT_TERM),
#ifdef _WIN32
OPT_CHOICE("priority", w32_priority, 0,
({"no", 0},