From 86487815beb5f6df65e598a1eb79b5fe1d060714 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 27 Jun 2002 16:31:51 +0000 Subject: Added more id3 update checks. Added %02d format to time string. Added title scrolling for player. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1235 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/wps.c') diff --git a/apps/wps.c b/apps/wps.c index 5ea0c12e8e..8a20adf413 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -95,7 +95,7 @@ static void draw_screen(struct mp3entry* id3) lcd_puts(0, l++, id3->album?id3->album:""); lcd_puts(0, l++, id3->artist?id3->artist:""); - snprintf(buffer,sizeof(buffer), "Time: %d:%d", + snprintf(buffer,sizeof(buffer), "Time: %d:%02d", id3->length / 60000, id3->length % 60000 / 1000 ); lcd_puts(0, l++, buffer); @@ -123,17 +123,25 @@ void wps_show(void) static bool playing = true; struct mp3entry* id3 = mpeg_current_track(); int lastlength=0, lastsize=0, lastrate=0; + int lastartist=0, lastalbum=0, lasttitle=0; while ( 1 ) { int i; if ( ( id3->length != lastlength ) || ( id3->filesize != lastsize ) || - ( id3->bitrate != lastrate ) ) { + ( id3->bitrate != lastrate ) || + ( id3->artist[0] != lastartist ) || + ( id3->album[0] != lastalbum ) || + ( id3->title[0] != lasttitle ) ) + { draw_screen(id3); lastlength = id3->length; lastsize = id3->filesize; lastrate = id3->bitrate; + lastartist = id3->artist[0]; + lastalbum = id3->album[0]; + lasttitle = id3->title[0]; } for ( i=0;i<20;i++ ) { -- cgit v1.2.3