diff options
author | Johannes Nixdorf <mixi@exherbo.org> | 2014-01-15 21:43:57 +0100 |
---|---|---|
committer | Johannes Nixdorf <mixi@exherbo.org> | 2014-01-15 23:12:34 +0100 |
commit | 1d9c62b644a3f8da39802ed99dc27e85bdd47792 (patch) | |
tree | 1f9c2c45851e4aa831b6011dac344bb92405287b /player | |
parent | 195e087086dd2cf7be0fea56ac7b703d32bd59fe (diff) | |
download | mpv-1d9c62b644a3f8da39802ed99dc27e85bdd47792.tar.bz2 mpv-1d9c62b644a3f8da39802ed99dc27e85bdd47792.tar.xz |
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.
Diffstat (limited to 'player')
-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]; |