From 6a6f6364a4c0234e8c37ead72a5ba57c263b456e Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 27 Jun 2002 10:24:11 +0000 Subject: Added path to default display. Time is now MM:SS instead of ms. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1234 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/wps.c b/apps/wps.c index aabccd6a9c..5ea0c12e8e 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -66,9 +66,8 @@ static void draw_screen(struct mp3entry* id3) // removes the .mp3 from the end of the display buffer szPeriod = strrchr(szDelimit, '.'); - if (szPeriod != NULL) { - memset(szPeriod, 0, 3); - } + if (szPeriod != NULL) + *szPeriod = 0; lcd_puts_scroll(0,LINE_Y,(++szDelimit)); break; @@ -91,11 +90,14 @@ static void draw_screen(struct mp3entry* id3) #ifdef HAVE_LCD_BITMAP char buffer[64]; + lcd_puts_scroll(0, l++, id3->path); lcd_puts(0, l++, id3->title?id3->title:""); lcd_puts(0, l++, id3->album?id3->album:""); lcd_puts(0, l++, id3->artist?id3->artist:""); - snprintf(buffer,sizeof(buffer), "%d ms", id3->length); + snprintf(buffer,sizeof(buffer), "Time: %d:%d", + id3->length / 60000, + id3->length % 60000 / 1000 ); lcd_puts(0, l++, buffer); snprintf(buffer,sizeof(buffer), "%d kbits", id3->bitrate); -- cgit v1.2.3