diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cfg-mplayer.h | 1 | ||||
-rw-r--r-- | core/command.c | 4 | ||||
-rw-r--r-- | core/defaultopts.c | 1 | ||||
-rw-r--r-- | core/mplayer.c | 2 | ||||
-rw-r--r-- | core/options.h | 1 |
5 files changed, 6 insertions, 3 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index 1bc01f5230..6de9b7e65c 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -499,6 +499,7 @@ const m_option_t common_opts[] = { OPT_INTRANGE("ass-hinting", ass_hinting, 0, 0, 7), OPT_CHOICE("ass-style-override", ass_style_override, 0, ({"no", 0}, {"yes", 1})), + OPT_FLAG("osd-bar", osd_bar_visible, 0), OPT_FLOATRANGE("osd-bar-align-x", osd_bar_align_x, 0, -1.0, +1.0), OPT_FLOATRANGE("osd-bar-align-y", osd_bar_align_y, 0, -1.0, +1.0), OPT_GENERAL("osd", osd_style, M_OPT_PREFIXED, diff --git a/core/command.c b/core/command.c index 7b9f374e0d..ba005f80ff 100644 --- a/core/command.c +++ b/core/command.c @@ -1585,7 +1585,7 @@ static void show_property_osd(MPContext *mpctx, const char *pname, set_osd_bar(mpctx, osd_progbar, osd_name, prop.min, prop.max, f); } - if (osd_mode == MP_ON_OSD_AUTO) + if (osd_mode == MP_ON_OSD_AUTO && opts->osd_bar_visible) return; } @@ -1742,7 +1742,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) } if (bar_osd) mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR; - if (msg_osd && !auto_osd) + if (msg_osd && !(auto_osd && opts->osd_bar_visible)) mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT; break; } diff --git a/core/defaultopts.c b/core/defaultopts.c index 2399b853df..1119ef0633 100644 --- a/core/defaultopts.c +++ b/core/defaultopts.c @@ -57,6 +57,7 @@ void set_default_mplayer_options(struct MPOpts *opts) .drc_level = 1., .movie_aspect = -1., .sub_auto = 1, + .osd_bar_visible = 1, #ifdef CONFIG_ASS .ass_enabled = 1, #endif diff --git a/core/mplayer.c b/core/mplayer.c index 29e06e0caa..40ab1ffad3 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -1382,7 +1382,7 @@ void set_osd_bar(struct MPContext *mpctx, int type, const char *name, double min, double max, double val) { struct MPOpts *opts = &mpctx->opts; - if (opts->osd_level < 1) + if (opts->osd_level < 1 || !opts->osd_bar_visible) return; if (mpctx->sh_video && opts->term_osd != 1) { diff --git a/core/options.h b/core/options.h index f5e350f076..94842cbc53 100644 --- a/core/options.h +++ b/core/options.h @@ -117,6 +117,7 @@ typedef struct MPOpts { char **sub_name; char **sub_paths; int sub_auto; + int osd_bar_visible; float osd_bar_align_x; float osd_bar_align_y; struct osd_style_opts *osd_style; |