summaryrefslogtreecommitdiffstats
path: root/core
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
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')
-rw-r--r--core/cfg-mplayer.h1
-rw-r--r--core/command.c25
2 files changed, 2 insertions, 24 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index 5a2c32e0d0..529972766b 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -476,6 +476,7 @@ const m_option_t common_opts[] = {
{"sub-delay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
{"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
OPT_FLAG("autosub", sub_auto, 0),
+ OPT_FLAG("sub-visibility", sub_visibility, 0),
OPT_FLAG("sub-forced-only", forced_subs_only, 0),
// enable Closed Captioning display
{"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL},
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