From 9fc74d5acd6fcc9b521a78ecfa9dc0ec3487fc8b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 28 Nov 2015 19:59:11 +0100 Subject: vo_opengl: warn if interpolation is enabled, but not display-sync Try to avoid user confusion. Reading the global options in this place is a pretty disgusting hack, but it's still the most robust way. --- video/out/opengl/video.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'video/out') diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 2436ffdfe3..70e98aeea1 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -33,6 +33,8 @@ #include "misc/bstr.h" #include "options/m_config.h" +#include "common/global.h" +#include "options/options.h" #include "common.h" #include "utils.h" #include "hwdec.h" @@ -225,6 +227,8 @@ struct gl_video { struct gl_hwdec *hwdec; bool hwdec_active; + + bool dsi_warned; }; struct fmt_entry { @@ -2846,6 +2850,12 @@ void gl_video_set_options(struct gl_video *p, struct gl_video_opts *opts) check_gl_features(p); uninit_rendering(p); + + if (p->opts.interpolation && !p->global->opts->video_sync && !p->dsi_warned) { + MP_WARN(p, "Interpolation now requires enabling display-sync mode.\n" + "E.g.: --video-sync=display-resample\n"); + p->dsi_warned = true; + } } void gl_video_configure_queue(struct gl_video *p, struct vo *vo) -- cgit v1.2.3