1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-06 15:11:58 +00:00

player: use more than 1/100 resolution for --term-osd-bar

If the terminal width is large enough the position marker jumps over
several characters because currently pos only increases in 1/100th steps.
This commit is contained in:
Johannes Nixdorf 2014-01-15 21:43:57 +01:00
parent 195e087086
commit 1d9c62b644

View File

@ -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];