summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-11-28 11:16:01 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-11-28 11:16:01 +0000
commit8ed7ba1d7bdb813687805b7f2c2927d08fc86ed4 (patch)
tree6c436a772d66b23574d64975e04856a7017b944e /apps/gui/skin_engine
parentd66592bad11b09ede186751a0fa1751feb29c15f (diff)
Fix fs#12005 - have %pc,%pl and %pr return the number of seconds when used with %if() instead of a formatted time string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31082 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_tokens.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 48d79600d2..169c4a36fd 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -306,14 +306,20 @@ const char *get_id3_token(struct wps_token *token, struct mp3entry *id3,
return "?";
return buf;
case SKIN_TOKEN_TRACK_TIME_ELAPSED:
+ if (intval && limit == TOKEN_VALUE_ONLY)
+ *intval = elapsed/1000;
format_time(buf, buf_size, elapsed);
return buf;
case SKIN_TOKEN_TRACK_TIME_REMAINING:
+ if (intval && limit == TOKEN_VALUE_ONLY)
+ *intval = (length - elapsed)/1000;
format_time(buf, buf_size, length - elapsed);
return buf;
case SKIN_TOKEN_TRACK_LENGTH:
+ if (intval && limit == TOKEN_VALUE_ONLY)
+ *intval = length/1000;
format_time(buf, buf_size, length);
return buf;