From 3a203ec68de8778003d7ed5b62a810e7fa51b102 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Wed, 14 Jul 2004 10:18:11 +0000 Subject: 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 --- apps/wps-display.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps/wps-display.c') 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. -- cgit v1.2.3