summaryrefslogtreecommitdiffstats
path: root/core/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-29 01:39:50 +0200
committerwm4 <wm4@nowhere>2013-05-30 22:41:24 +0200
commitfd02f0f4d88371c728aff3b4487974118ba4d014 (patch)
tree222cd0a24b2525840ecc5aba8355f9e464acff10 /core/command.c
parentf429b4eaa89d9d752b2701582ebc287265f20450 (diff)
downloadmpv-fd02f0f4d88371c728aff3b4487974118ba4d014.tar.bz2
mpv-fd02f0f4d88371c728aff3b4487974118ba4d014.tar.xz
options: add --no-sub-visibility for symmetry
Not really useful, but for symmetry with the sub-visibility property (mapped to the 'v' key by default).
Diffstat (limited to 'core/command.c')
-rw-r--r--core/command.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/core/command.c b/core/command.c
index 4e82ceccd8..5fa914fdf7 100644
--- a/core/command.c
+++ b/core/command.c
@@ -1294,28 +1294,6 @@ static int mp_property_sub_pos(m_option_t *prop, int action, void *arg,
return property_osd_helper(prop, action, arg, mpctx);
}
-/// Subtitle visibility (RW)
-static int mp_property_sub_visibility(m_option_t *prop, int action,
- void *arg, MPContext *mpctx)
-{
- struct MPOpts *opts = &mpctx->opts;
-
- if (!mpctx->sh_video)
- return M_PROPERTY_UNAVAILABLE;
-
- switch (action) {
- case M_PROPERTY_SET:
- opts->sub_visibility = *(int *)arg;
- osd_changed_all(mpctx->osd);
- return M_PROPERTY_OK;
- case M_PROPERTY_GET:
- *(int *)arg = opts->sub_visibility;
- return M_PROPERTY_OK;
- }
- return M_PROPERTY_NOT_IMPLEMENTED;
-}
-
-
#ifdef CONFIG_TV
static tvi_handle_t *get_tvh(struct MPContext *mpctx)
@@ -1493,8 +1471,7 @@ static const m_option_t mp_properties[] = {
M_OPTION_PROPERTY_CUSTOM("sid", mp_property_sub),
M_OPTION_PROPERTY_CUSTOM("sub-delay", mp_property_sub_delay),
M_OPTION_PROPERTY_CUSTOM("sub-pos", mp_property_sub_pos),
- { "sub-visibility", mp_property_sub_visibility, CONF_TYPE_FLAG,
- M_OPT_RANGE, 0, 1, NULL },
+ M_OPTION_PROPERTY_CUSTOM("sub-visibility", property_osd_helper),
M_OPTION_PROPERTY_CUSTOM("sub-forced-only", property_osd_helper),
M_OPTION_PROPERTY_CUSTOM("sub-scale", property_osd_helper),
#ifdef CONFIG_ASS