From 187903ef31da4029b9810e1ac910f8d1887667c1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 17 Feb 2013 22:35:10 +0100 Subject: osd: use --osd-duration for OSD bar It was hardcoded to 1 second (which is also the default for --osd-duration, so this was probably never noticed). --- core/mplayer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/mplayer.c b/core/mplayer.c index febc9cfa05..7a80701c16 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -1363,7 +1363,7 @@ void set_osd_bar(struct MPContext *mpctx, int type, const char *name, return; if (mpctx->sh_video && opts->term_osd != 1) { - mpctx->osd_visible = (GetTimerMS() + 1000) | 1; + mpctx->osd_visible = (GetTimerMS() + opts->osd_duration) | 1; mpctx->osd->progbar_type = type; mpctx->osd->progbar_value = 256 * (val - min) / (max - min); vo_osd_changed(OSDTYPE_PROGBAR); @@ -1387,8 +1387,10 @@ static void update_osd_bar(struct MPContext *mpctx, int type, void set_osd_function(struct MPContext *mpctx, int osd_function) { + struct MPOpts *opts = &mpctx->opts; + mpctx->osd_function = osd_function; - mpctx->osd_visible = (GetTimerMS() + 1000) | 1; + mpctx->osd_visible = (GetTimerMS() + opts->osd_duration) | 1; } /** -- cgit v1.2.3