From 2f165ee12ba2ebd64cb11224563faa08ecb83e17 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Sep 2013 18:33:43 +0200 Subject: gl_common: signal to GL backend whether we are probing This is supposed to reduce the amount of useless error messages shown during initialization of vo_opengl. If multiple backends are compiled, usually only one of them will work. For example, on Linux both X and Wayland backends can be compiled, but usually either Wayland or X is running. Then, if Wayland is not running, but X is, trying to initialize the Wayland backend should not spam the terminal with error messages. Signed-off-by: Andreas Sinz --- video/out/wayland_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'video/out/wayland_common.c') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 96277551c5..533b8c056d 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -593,8 +593,10 @@ static bool create_display (struct vo_wayland_state *wl) wl->display.display = wl_display_connect(NULL); if (!wl->display.display) { - MP_ERR(wl->vo, "failed to connect to a wayland server: " - "check if a wayland compositor is running\n"); + MP_MSG(wl, wl->vo->probing ? MSGL_V : MSGL_ERR, + "failed to connect to a wayland server: " + "check if a wayland compositor is running\n"); + return false; } -- cgit v1.2.3