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)
downloadrockbox-3a203ec68de8778003d7ed5b62a810e7fa51b102.tar.gz
rockbox-3a203ec68de8778003d7ed5b62a810e7fa51b102.zip
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)
237 */ 237 */
238static void format_time(char* buf, int buf_size, int time) 238static void format_time(char* buf, int buf_size, int time)
239{ 239{
240 snprintf(buf, buf_size, "%d:%02d", time / 60000, time % 60000 / 1000); 240 if ( time < 3600000 ) {
241 snprintf(buf, buf_size, "%d:%02d",
242 time % 3600000 / 60000, time % 60000 / 1000);
243 } else {
244 snprintf(buf, buf_size, "%d:%02d:%02d",
245 time / 3600000, time % 3600000 / 60000, time % 60000 / 1000);
246 }
241} 247}
242 248
243/* Extract a part from a path. 249/* Extract a part from a path.