summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-14 10:18:11 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-14 10:18:11 +0000
commit3a203ec68de8778003d7ed5b62a810e7fa51b102 (patch)
tree6e1a414b4cdb9b858de06a8d6b7ac53a329aeaa2 /apps/wps-display.c
parentb1af93c31461879d7d36f409261a12af74be4671 (diff)
Patch #911298 by Steve Cundari, adds hour display to WPS and bookmarks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4878 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 457282c350..9f136ffa0c 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -237,7 +237,13 @@ bool wps_load(char* file, bool display)
*/
static void format_time(char* buf, int buf_size, int time)
{
- snprintf(buf, buf_size, "%d:%02d", time / 60000, time % 60000 / 1000);
+ if ( time < 3600000 ) {
+ snprintf(buf, buf_size, "%d:%02d",
+ time % 3600000 / 60000, time % 60000 / 1000);
+ } else {
+ snprintf(buf, buf_size, "%d:%02d:%02d",
+ time / 3600000, time % 3600000 / 60000, time % 60000 / 1000);
+ }
}
/* Extract a part from a path.