diff options
author | wm4 <wm4@nowhere> | 2013-12-10 19:58:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-10 20:07:39 +0100 |
commit | 7c7d214775f87e82312aa1441d59ddf7c0df9d2e (patch) | |
tree | a398eb6f7e1368c5f4c5ec2c4684f83c0f017e13 /sub/osd_libass.c | |
parent | bf003033e376b34779373565595f2863fe3c4dd6 (diff) | |
download | mpv-7c7d214775f87e82312aa1441d59ddf7c0df9d2e.tar.bz2 mpv-7c7d214775f87e82312aa1441d59ddf7c0df9d2e.tar.xz |
osd: add option for "unscaled" OSD
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r-- | sub/osd_libass.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 0564fbb4d3..71255256a9 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -163,8 +163,13 @@ static void update_osd(struct osd_state *osd, struct osd_object *obj) struct osd_style_opts font = *opts->osd_style; font.font_size *= opts->osd_scale; + double playresy = obj->osd_track->PlayResY; + // Compensate for libass and mp_ass_set_style scaling the font etc. + if (!opts->osd_scale_by_window) + playresy *= 720.0 / obj->vo_res.h; + ASS_Style *style = obj->osd_track->styles + obj->osd_track->default_style; - mp_ass_set_style(style, obj->osd_track->PlayResY, &font); + mp_ass_set_style(style, playresy, &font); char *text = mangle_ass(osd->osd_text); add_osd_ass_event(obj->osd_track, text); |