summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-30 22:25:34 +0200
committerwm4 <wm4@nowhere>2013-10-05 22:46:55 +0200
commitfd49edccf811de0d6c61f30d8b2b524f8df93b36 (patch)
tree274ec3cd18cb62abacf77f7249636bf8c2bf43ad /sub
parent1be863afdbe9017aa227234e8525b209fb818224 (diff)
downloadmpv-fd49edccf811de0d6c61f30d8b2b524f8df93b36.tar.bz2
mpv-fd49edccf811de0d6c61f30d8b2b524f8df93b36.tar.xz
command: add properties for retrieving OSD dimensions
Diffstat (limited to 'sub')
-rw-r--r--sub/sub.c3
-rw-r--r--sub/sub.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/sub/sub.c b/sub/sub.c
index 1beb9e8138..cc4a76c065 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -222,6 +222,9 @@ void osd_draw(struct osd_state *osd, struct mp_osd_res res,
if (draw_flags & OSD_DRAW_SUB_FILTER)
draw_flags |= OSD_DRAW_SUB_ONLY;
+ if (!(draw_flags & OSD_DRAW_SUB_ONLY))
+ osd->last_vo_res = res;
+
for (int n = 0; n < MAX_OSD_PARTS; n++) {
struct osd_object *obj = osd->objs[n];
diff --git a/sub/sub.h b/sub/sub.h
index 35527f266b..1118fec5c1 100644
--- a/sub/sub.h
+++ b/sub/sub.h
@@ -128,6 +128,8 @@ struct osd_state {
bool render_subs_in_filter;
bool render_bitmap_subs;
+ struct mp_osd_res last_vo_res;
+
bool want_redraw;
// OSDTYPE_OSD