diff options
author | Justin Heiner <jheiner@rockbox.org> | 2002-08-30 03:08:02 +0000 |
---|---|---|
committer | Justin Heiner <jheiner@rockbox.org> | 2002-08-30 03:08:02 +0000 |
commit | 87f53249b22fda1dda1549e1ff2c3c7ca89d92ad (patch) | |
tree | 02c15a3a6757e021b9441abd9be0aee8e4973578 | |
parent | bd1ddf6d5ab479ff5688364f7779a4467de9eb6a (diff) |
Added %pr to CUSTOM_WPS to display remaining time in song.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2072 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/wps.c | 9 | ||||
-rw-r--r-- | docs/CUSTOM_WPS_FORMAT | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/wps.c b/apps/wps.c index 1db85d806c..4699ed30d8 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -547,6 +547,11 @@ bool display_custom_wps(int x_val, int y_val, bool do_scroll, char *wps_string) (id3->elapsed + ff_rewind_count) / 60000, (id3->elapsed + ff_rewind_count) % 60000 / 1000); break; + case 'r': /* Remaining Time in Song */ + snprintf(tmpbuf, sizeof(tmpbuf), "%d:%02d", + (id3->length - (id3->elapsed + ff_rewind_count)) / 60000, + (id3->length - (id3->elapsed + ff_rewind_count)) % 60000 / 1000); + break; case 't': /* Total Time */ snprintf(tmpbuf, sizeof(tmpbuf), "%d:%02d", id3->length / 60000, @@ -1019,7 +1024,9 @@ static bool ffwd_rew(int button) if (!exit) button = button_get(true); } - +#ifdef CUSTOM_WPS + refresh_wps(true); +#endif return usb; } diff --git a/docs/CUSTOM_WPS_FORMAT b/docs/CUSTOM_WPS_FORMAT index 776135ba47..e4721bcce9 100644 --- a/docs/CUSTOM_WPS_FORMAT +++ b/docs/CUSTOM_WPS_FORMAT @@ -45,6 +45,7 @@ Playlist/Song Info Tags: %pp : Playlist Position %pe : Playlist Total Entries %pc : Current Time In Song + %pr : Remaining Time In Song %pt : Total Track Time Other Tags: %% : Displays a % |