summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-01 11:16:01 +0100
committerwm4 <wm4@nowhere>2013-03-01 11:16:01 +0100
commitd511ef79a09fa9e42479e66f4837daaa68b7255b (patch)
tree9df1d56baf902583387317af3070152c6de40f0c /core
parent6b3d510165201e5600e9ec25c37f33541c03f58a (diff)
downloadmpv-d511ef79a09fa9e42479e66f4837daaa68b7255b.tar.bz2
mpv-d511ef79a09fa9e42479e66f4837daaa68b7255b.tar.xz
core: simplify OSD capability handling, remove VFCAP_OSD
VFCAP_OSD was used to determine at runtime whether the VO supports OSD rendering. This was mostly unused. vo_direct3d had an option to disable OSD (was supposed to allow to force auto-insertion of vf_ass, but we removed that anyway). vo_opengl_old could disable OSD rendering when a very old OpenGL version was detected, and had an option to explicitly disable it as well. Remove VFCAP_OSD from everything (and some associated logic). Now the vo_driver.draw_osd callback can be set to NULL to indicate missing OSD support (important so that vo_null etc. don't single-step on OSD redraw), and if OSD support depends on runtime support, the VO's draw_osd should just do nothing if OSD is not available. Also, do not access vo->want_redraw directly. Change the want_redraw reset logic for this purpose, too. (Probably unneeded, vo_flip_page resets it already.)
Diffstat (limited to 'core')
-rw-r--r--core/mplayer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index f9bc7ffb69..bd36056872 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -2634,7 +2634,6 @@ static void draw_osd(struct MPContext *mpctx)
mpctx->osd->vo_pts = mpctx->video_pts;
vo_draw_osd(vo, mpctx->osd);
- mpctx->osd->want_redraw = false;
}
static bool redraw_osd(struct MPContext *mpctx)
@@ -3458,8 +3457,8 @@ static void run_playloop(struct MPContext *mpctx)
}
sleeptime = FFMIN(sleeptime, audio_sleep);
if (sleeptime > 0 && mpctx->sh_video) {
- bool want_redraw = mpctx->video_out->want_redraw;
- if (mpctx->video_out->default_caps & VFCAP_OSD)
+ bool want_redraw = vo_get_want_redraw(mpctx->video_out);
+ if (mpctx->video_out->driver->draw_osd)
want_redraw |= mpctx->osd->want_redraw;
mpctx->osd->want_redraw = false;
if (want_redraw) {