summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-17 22:35:10 +0100
committerwm4 <wm4@nowhere>2013-02-17 22:35:10 +0100
commit187903ef31da4029b9810e1ac910f8d1887667c1 (patch)
treefd05ac29403df4b880d7c32c34ce5c823bae1ac1 /core
parente5f3b8da26d298e443ab4a2beb960c8fa4638365 (diff)
downloadmpv-187903ef31da4029b9810e1ac910f8d1887667c1.tar.bz2
mpv-187903ef31da4029b9810e1ac910f8d1887667c1.tar.xz
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).
Diffstat (limited to 'core')
-rw-r--r--core/mplayer.c6
1 files 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;
}
/**