summaryrefslogtreecommitdiffstats
path: root/apps/bookmark.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/bookmark.c
parentb1af93c31461879d7d36f409261a12af74be4671 (diff)
downloadrockbox-3a203ec68de8778003d7ed5b62a810e7fa51b102.tar.gz
rockbox-3a203ec68de8778003d7ed5b62a810e7fa51b102.tar.bz2
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/bookmark.c')
-rw-r--r--apps/bookmark.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index aa03004a35..7cc11ac0c3 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -849,10 +849,22 @@ static void display_bookmark(char* bookmark,
lcd_puts_scroll(0, 2, global_temp_buffer);
/* elapsed time*/
- snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d:%02d",
+ if ( ms < 3600000 )
+ {
+ snprintf(global_temp_buffer, sizeof(global_temp_buffer), "%s: %d:%02d",
+ str(LANG_BOOKMARK_SELECT_TIME_TEXT),
+ ms / 60000,
+ ms % 60000 / 1000);
+ }
+ else
+ {
+ snprintf(global_temp_buffer, sizeof(global_temp_buffer),
+ "%s: %d:%02d:%02d",
str(LANG_BOOKMARK_SELECT_TIME_TEXT),
- ms / 60000,
+ ms / 3600000,
+ ms % 3600000 / 60000,
ms % 60000 / 1000);
+ }
lcd_puts_scroll(0, 3, global_temp_buffer);
/* commands */
@@ -868,12 +880,26 @@ static void display_bookmark(char* bookmark,
dot=NULL;
if (dot)
*dot='\0';
- snprintf(global_temp_buffer, sizeof(global_temp_buffer),
- "%2d, %d:%02d, %s,",
+ if ( ms < 3600000 )
+ {
+ snprintf(global_temp_buffer, sizeof(global_temp_buffer),
+ "%2d, %d:%02d, %s,",
+ (bookmark_count+1),
+ ms / 60000,
+ ms % 60000 / 1000,
+ MP3_file_name);
+ }
+ else
+ {
+ snprintf(global_temp_buffer, sizeof(global_temp_buffer),
+ "%2d, %d:%02d:%02d, %s,",
(bookmark_count+1),
ms / 60000,
+ ms % 3600000 / 60000,
ms % 60000 / 1000,
MP3_file_name);
+ }
+
status_draw(false);
lcd_puts_scroll(0,0,global_temp_buffer);
lcd_puts(0,1,str(LANG_RESUME_CONFIRM_PLAYER));