summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-10 18:33:43 +0200
committerwm4 <wm4@nowhere>2013-09-16 13:45:33 +0200
commit2f165ee12ba2ebd64cb11224563faa08ecb83e17 (patch)
tree30d197e666c618a3901e5ab16cfd7581418dd13e /video/out/x11_common.c
parent6da11789ae51652445760369e1d61299fdbb81d8 (diff)
downloadmpv-2f165ee12ba2ebd64cb11224563faa08ecb83e17.tar.bz2
mpv-2f165ee12ba2ebd64cb11224563faa08ecb83e17.tar.xz
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 <andreas.sinz@aon.at>
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r--video/out/x11_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index b86d1ce661..8c6ddae3ea 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -462,7 +462,9 @@ int vo_x11_init(struct vo *vo)
x11->display = XOpenDisplay(dispName);
if (!x11->display) {
- MP_ERR(x11, "couldn't open the X11 display (%s)!\n", dispName);
+ MP_MSG(x11, vo->probing ? MSGL_V : MSGL_ERR,
+ "vo: couldn't open the X11 display (%s)!\n", dispName);
+
talloc_free(x11);
vo->x11 = NULL;
return 0;