From b1969c0ebabac517ec2b428cd5374186e461ff10 Mon Sep 17 00:00:00 2001 From: Andrey Morozov Date: Wed, 2 Jul 2014 02:14:30 +0400 Subject: command: change cache perentage to float, add cache-free and cache-used --- player/osd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'player/osd.c') diff --git a/player/osd.c b/player/osd.c index 5f765618ae..939d62fd98 100644 --- a/player/osd.c +++ b/player/osd.c @@ -221,9 +221,9 @@ void print_status(struct MPContext *mpctx) saddf(&line, " Late: %d", mpctx->drop_frame_cnt); } - int cache = mp_get_cache_percent(mpctx); + float cache = mp_get_cache_percent(mpctx); if (cache >= 0) - saddf(&line, " Cache: %d%%", cache); + saddf(&line, " Cache: %.2f%%", cache); if (opts->term_osd_bar) { saddf(&line, "\n"); @@ -441,9 +441,9 @@ static void sadd_osd_status(char **buffer, struct MPContext *mpctx, bool full) saddf(buffer, " / "); sadd_hhmmssff(buffer, get_time_length(mpctx), fractions); sadd_percentage(buffer, get_percent_pos(mpctx)); - int cache = mp_get_cache_percent(mpctx); + float cache = mp_get_cache_percent(mpctx); if (cache >= 0) - saddf(buffer, " Cache: %d%%", cache); + saddf(buffer, " Cache: %.2f%%", cache); } } } -- cgit v1.2.3