From 3c2d20e414cecbb28c5faa56c13135cef871ab4e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 30 Apr 2018 19:28:37 +0200 Subject: common: add missing %f time format It was documented for --screenshot-template, but apparently never implemented. This value is not explicitly rounded, other than for printf() %f default formatting (which rounds to 6 digits). --- common/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/common.c b/common/common.c index 786d2e5328..e8a100dcc4 100644 --- a/common/common.c +++ b/common/common.c @@ -72,6 +72,7 @@ char *mp_format_time_fmt(const char *fmt, double time) case 's': appendf(&res, "%s%lld", sign, itime); break; case 'S': appendf(&res, "%02lld", s); break; case 'T': appendf(&res, "%03d", ms); break; + case 'f': appendf(&res, "%f", time); break; case '%': appendf(&res, "%s", "%"); break; default: goto error; } -- cgit v1.2.3