diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-03-18 07:08:49 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-03-18 07:08:49 +0000 |
commit | d2e2c2ad96222a55a5005edbbdea3fe755c388a5 (patch) | |
tree | 6b8b52bf1b82502afe1f62f08d1f6359c735ac91 /apps/gui/skin_engine/skin_tokens.c | |
parent | c3c928b29feb592ec9a4d9c93580611d129c991d (diff) | |
download | rockbox-d2e2c2ad96222a55a5005edbbdea3fe755c388a5.tar.gz rockbox-d2e2c2ad96222a55a5005edbbdea3fe755c388a5.zip |
2 new tags:
%pS - track is starting.
%pE - track is ending. both can optionally have a number straight after to change how long that tag should stay true for (e.g %pS10 will stay true for the first 10s of the track)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25239 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 486a2efc76..df2c42e727 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -896,6 +896,23 @@ const char *get_token_value(struct gui_wps *gwps, | |||
896 | token->value.i * TIMEOUT_UNIT)) | 896 | token->value.i * TIMEOUT_UNIT)) |
897 | return "v"; | 897 | return "v"; |
898 | return NULL; | 898 | return NULL; |
899 | |||
900 | case WPS_TOKEN_TRACK_STARTING: | ||
901 | if (id3) | ||
902 | { | ||
903 | int elapsed = id3->elapsed + + state->ff_rewind_count; | ||
904 | if (elapsed < token->value.i * HZ) | ||
905 | return "starting"; | ||
906 | } | ||
907 | return NULL; | ||
908 | case WPS_TOKEN_TRACK_ENDING: | ||
909 | if (id3) | ||
910 | { | ||
911 | int elapsed = id3->elapsed + + state->ff_rewind_count; | ||
912 | if (id3->length - elapsed < token->value.i * HZ) | ||
913 | return "ending"; | ||
914 | } | ||
915 | return NULL; | ||
899 | case WPS_TOKEN_LASTTOUCH: | 916 | case WPS_TOKEN_LASTTOUCH: |
900 | #ifdef HAVE_TOUCHSCREEN | 917 | #ifdef HAVE_TOUCHSCREEN |
901 | if (TIME_BEFORE(current_tick, token->value.i * TIMEOUT_UNIT + | 918 | if (TIME_BEFORE(current_tick, token->value.i * TIMEOUT_UNIT + |