summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/wps.c12
1 files changed, 10 insertions, 2 deletions
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)
95 lcd_puts(0, l++, id3->album?id3->album:""); 95 lcd_puts(0, l++, id3->album?id3->album:"");
96 lcd_puts(0, l++, id3->artist?id3->artist:""); 96 lcd_puts(0, l++, id3->artist?id3->artist:"");
97 97
98 snprintf(buffer,sizeof(buffer), "Time: %d:%d", 98 snprintf(buffer,sizeof(buffer), "Time: %d:%02d",
99 id3->length / 60000, 99 id3->length / 60000,
100 id3->length % 60000 / 1000 ); 100 id3->length % 60000 / 1000 );
101 lcd_puts(0, l++, buffer); 101 lcd_puts(0, l++, buffer);
@@ -123,17 +123,25 @@ void wps_show(void)
123 static bool playing = true; 123 static bool playing = true;
124 struct mp3entry* id3 = mpeg_current_track(); 124 struct mp3entry* id3 = mpeg_current_track();
125 int lastlength=0, lastsize=0, lastrate=0; 125 int lastlength=0, lastsize=0, lastrate=0;
126 int lastartist=0, lastalbum=0, lasttitle=0;
126 127
127 while ( 1 ) { 128 while ( 1 ) {
128 int i; 129 int i;
129 130
130 if ( ( id3->length != lastlength ) || 131 if ( ( id3->length != lastlength ) ||
131 ( id3->filesize != lastsize ) || 132 ( id3->filesize != lastsize ) ||
132 ( id3->bitrate != lastrate ) ) { 133 ( id3->bitrate != lastrate ) ||
134 ( id3->artist[0] != lastartist ) ||
135 ( id3->album[0] != lastalbum ) ||
136 ( id3->title[0] != lasttitle ) )
137 {
133 draw_screen(id3); 138 draw_screen(id3);
134 lastlength = id3->length; 139 lastlength = id3->length;
135 lastsize = id3->filesize; 140 lastsize = id3->filesize;
136 lastrate = id3->bitrate; 141 lastrate = id3->bitrate;
142 lastartist = id3->artist[0];
143 lastalbum = id3->album[0];
144 lasttitle = id3->title[0];
137 } 145 }
138 146
139 for ( i=0;i<20;i++ ) { 147 for ( i=0;i<20;i++ ) {