diff options
author | Dudemanguy <random342@airmail.cc> | 2023-12-13 15:36:58 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-12-16 15:25:32 +0000 |
commit | b0f31a76376cae73506e3969dff805de8a18b198 (patch) | |
tree | e3771b0debf9d881539ca6889262ddb982ad4921 /player/osd.c | |
parent | ace2d6506f20dfc6a30d0bbb6cfb959f2144bfc9 (diff) | |
download | mpv-b0f31a76376cae73506e3969dff805de8a18b198.tar.bz2 mpv-b0f31a76376cae73506e3969dff805de8a18b198.tar.xz |
player: refactor secondary subtitle options and properties
Over the years, we've accumulated several secondary subtitle related
options and properties, but the implementation was not really consistent
and it wasn't clear what the right process for adding more should be. So
to make things nicer, let's refactor all of the subtitle options with
secondary variants (sub-delay, sub-pos, and sub-visibility) and split
them off to a new, separate struct. All of the underlying values are
stored in an array instead for simplicity. Additionally, the
implementation of some secondary-sub-* properties were slightly changed
so there would be less redundancy.
Diffstat (limited to 'player/osd.c')
-rw-r--r-- | player/osd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/osd.c b/player/osd.c index dc0322947d..d655ba4bcb 100644 --- a/player/osd.c +++ b/player/osd.c @@ -112,7 +112,7 @@ static void term_osd_update_title(struct MPContext *mpctx) void term_osd_set_subs(struct MPContext *mpctx, const char *text) { - if (mpctx->video_out || !text || !mpctx->opts->subs_rend->sub_visibility) + if (mpctx->video_out || !text || !mpctx->opts->subs_shared->sub_visibility[0]) text = ""; // disable if (strcmp(mpctx->term_osd_subs ? mpctx->term_osd_subs : "", text) == 0) return; |