From 8cd1b33a22bef714e1185bc8e435d68530caac09 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 20:11:45 +0100 Subject: x11: mp_msg conversion for fstype help output --- player/main.c | 2 +- video/out/x11_common.c | 15 ++++++--------- video/out/x11_common.h | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/player/main.c b/player/main.c index 555ae11085..1211a32f39 100644 --- a/player/main.c +++ b/player/main.c @@ -211,7 +211,7 @@ static bool handle_help_options(struct MPContext *mpctx) } #if HAVE_X11 if (opts->vo.fstype_list && strcmp(opts->vo.fstype_list[0], "help") == 0) { - fstype_help(); + fstype_help(log); MP_INFO(mpctx, "\n"); opt_exit = 1; } diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 55a11e81b3..494ba40eda 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -237,16 +237,13 @@ static const struct fstype fstypes[] = { {0}, }; -void fstype_help(void) +void fstype_help(struct mp_log *log) { - mp_msg(MSGT_VO, MSGL_INFO, "Available fullscreen layer change modes:\n"); - for (int n = 0; fstypes[n].sym; n++) { - mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", fstypes[n].sym, - fstypes[n].help); - } - mp_msg(MSGT_VO, MSGL_INFO, - "You can also negate the settings with simply putting '-' in the beginning"); - mp_msg(MSGT_VO, MSGL_INFO, "\n"); + mp_info(log, "Available fullscreen layer change modes:\n"); + for (int n = 0; fstypes[n].sym; n++) + mp_info(log, " %-15s %s\n", fstypes[n].sym, fstypes[n].help); + mp_info(log, + "You can also negate the settings with simply putting '-' in the beginning\n"); } static void fstype_dump(struct vo_x11_state *x11) diff --git a/video/out/x11_common.h b/video/out/x11_common.h index dedf85c257..2763009755 100644 --- a/video/out/x11_common.h +++ b/video/out/x11_common.h @@ -26,6 +26,7 @@ struct vo; struct mp_rect; +struct mp_log; struct vo_x11_state { struct mp_log *log; @@ -124,7 +125,7 @@ int vo_x11_init(struct vo *vo); void vo_x11_uninit(struct vo *vo); int vo_x11_check_events(struct vo *vo); bool vo_x11_screen_is_composited(struct vo *vo); -void fstype_help(void); +void fstype_help(struct mp_log *log); void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y, unsigned int width, unsigned int height, int flags, -- cgit v1.2.3