diff options
-rw-r--r-- | player/osd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/osd.c b/player/osd.c index 29ac7af8fe..f3096ea5cf 100644 --- a/player/osd.c +++ b/player/osd.c @@ -110,7 +110,8 @@ static void add_term_osd_bar(struct MPContext *mpctx, char **line, int width) if (width < 5) return; - int pos = get_percent_pos(mpctx) / 100.0 * (width - 2); + int pos = get_current_pos_ratio(mpctx, false) * (width - 2); + pos = MPCLAMP(pos, 0, width - 2); bstr chars = bstr0(opts->term_osd_bar_chars); bstr parts[5]; |