diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/core.h | 1 | ||||
-rw-r--r-- | player/main.c | 1 | ||||
-rw-r--r-- | player/osd.c | 6 |
3 files changed, 5 insertions, 3 deletions
diff --git a/player/core.h b/player/core.h index ad3d121aa7..711c99840b 100644 --- a/player/core.h +++ b/player/core.h @@ -147,6 +147,7 @@ typedef struct MPContext { struct mpv_global *global; struct MPOpts *opts; struct mp_log *log; + struct mp_log *statusline; struct m_config *mconfig; struct input_ctx *input; struct osd_state *osd; diff --git a/player/main.c b/player/main.c index c778507d1c..1844746650 100644 --- a/player/main.c +++ b/player/main.c @@ -298,6 +298,7 @@ static int mpv_main(int argc, char *argv[]) // Nothing must call mp_msg*() and related before this mp_msg_init(mpctx->global); mpctx->log = mp_log_new(mpctx, mpctx->global->log, "!cplayer"); + mpctx->statusline = mp_log_new(mpctx, mpctx->log, "!statusline"); // Create the config context and register the options mpctx->mconfig = m_config_new(mpctx, mpctx->log, sizeof(struct MPOpts), diff --git a/player/osd.c b/player/osd.c index f475757bdc..607af6714e 100644 --- a/player/osd.c +++ b/player/osd.c @@ -72,13 +72,13 @@ void write_status_line(struct MPContext *mpctx, const char *line) { struct MPOpts *opts = mpctx->opts; if (opts->slave_mode) { - MP_MSG(mpctx, MSGL_STATUS, "%s\n", line); + mp_msg(mpctx->statusline, MSGL_STATUS, "%s\n", line); } else if (erase_to_end_of_line) { - MP_MSG(mpctx, MSGL_STATUS, "%s%s\r", line, erase_to_end_of_line); + mp_msg(mpctx->statusline, MSGL_STATUS, "%s%s\r", line, erase_to_end_of_line); } else { int pos = strlen(line); int width = get_term_width() - pos; - MP_MSG(mpctx, MSGL_STATUS, "%s%*s\r", line, width, ""); + mp_msg(mpctx->statusline, MSGL_STATUS, "%s%*s\r", line, width, ""); } } |