summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorAndrey Morozov <morozov.andrey.vmk@gmail.com>2014-07-02 02:14:30 +0400
committerwm4 <wm4@nowhere>2014-07-02 01:28:11 +0200
commitb1969c0ebabac517ec2b428cd5374186e461ff10 (patch)
treeede602f321aa94f5a738e1777a748427471e4190 /player/osd.c
parent9fee8fd3b3b319908861d8f41c4342d746aecc04 (diff)
downloadmpv-b1969c0ebabac517ec2b428cd5374186e461ff10.tar.bz2
mpv-b1969c0ebabac517ec2b428cd5374186e461ff10.tar.xz
command: change cache perentage to float, add cache-free and cache-used
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c8
1 files changed, 4 insertions, 4 deletions
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);
}
}
}