From a87005b7fae807d2e3ae3181d97712b643b89d4d Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 11 Aug 2014 13:30:08 +0200 Subject: command: for OSD, format cache property as integer For convenience. Use ${=cache} to get the old formatting. --- player/command.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index cae7e02805..c0800d612d 100644 --- a/player/command.c +++ b/player/command.c @@ -1099,6 +1099,11 @@ static int mp_property_cache(void *ctx, struct m_property *prop, if (cache < 0) return M_PROPERTY_UNAVAILABLE; + if (action == M_PROPERTY_PRINT) { + *(char **)arg = talloc_asprintf(NULL, "%d %%", (int)cache); + return M_PROPERTY_OK; + } + return m_property_float_ro(action, arg, cache); } -- cgit v1.2.3