diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-06-27 16:31:51 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-06-27 16:31:51 +0000 |
commit | 86487815beb5f6df65e598a1eb79b5fe1d060714 (patch) | |
tree | 56166f597f0fee02705ac597cbfa4d1b046e8ba1 /apps/wps.c | |
parent | 6a6f6364a4c0234e8c37ead72a5ba57c263b456e (diff) | |
download | rockbox-86487815beb5f6df65e598a1eb79b5fe1d060714.tar.gz rockbox-86487815beb5f6df65e598a1eb79b5fe1d060714.zip |
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
Diffstat (limited to 'apps/wps.c')
-rw-r--r-- | apps/wps.c | 12 |
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++ ) { |