summaryrefslogtreecommitdiff
path: root/apps/wps.c
diff options
context:
space:
mode:
authorJerome Kuptz <jeromekuptz@gmail.com>2002-06-28 04:28:59 +0000
committerJerome Kuptz <jeromekuptz@gmail.com>2002-06-28 04:28:59 +0000
commitb00ced79799491cc152b5a713887d90bb6ffeef4 (patch)
tree9d898e0fcb3785a6ae07e1323131c7bfb5d8279c /apps/wps.c
parent458a3436c2613bd5a085fc72bf7f4b3cc32a535a (diff)
downloadrockbox-b00ced79799491cc152b5a713887d90bb6ffeef4.tar.gz
rockbox-b00ced79799491cc152b5a713887d90bb6ffeef4.zip
added zagor's time display to the file scroll WPS screen for the player.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1240 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps.c')
-rw-r--r--apps/wps.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/wps.c b/apps/wps.c
index 18d9ff320c..c9fb9237db 100644
--- a/apps/wps.c
+++ b/apps/wps.c
@@ -81,7 +81,6 @@ static void draw_screen(struct mp3entry* id3)
81 lcd_puts_scroll(0,0, (++szLast)); 81 lcd_puts_scroll(0,0, (++szLast));
82 else 82 else
83 lcd_puts_scroll(0,0, id3->path); 83 lcd_puts_scroll(0,0, id3->path);
84
85 break; 84 break;
86 } 85 }
87 case PLAY_DISPLAY_DEFAULT: 86 case PLAY_DISPLAY_DEFAULT:
@@ -122,6 +121,7 @@ void wps_show(void)
122 121
123 while ( 1 ) { 122 while ( 1 ) {
124 int i; 123 int i;
124 char buffer[32];
125 125
126 if ( ( id3->length != lastlength ) || 126 if ( ( id3->length != lastlength ) ||
127 ( id3->filesize != lastsize ) || 127 ( id3->filesize != lastsize ) ||
@@ -138,20 +138,24 @@ void wps_show(void)
138 lastalbum = id3->album[0]; 138 lastalbum = id3->album[0];
139 lasttitle = id3->title[0]; 139 lasttitle = id3->title[0];
140 } 140 }
141 141
142#ifdef HAVE_LCD_BITMAP 142 if (playing)
143 { 143 {
144 char buffer[32];
145 snprintf(buffer,sizeof(buffer), "Time: %d:%02d / %d:%02d", 144 snprintf(buffer,sizeof(buffer), "Time: %d:%02d / %d:%02d",
146 id3->elapsed / 60000, 145 id3->elapsed / 60000,
147 id3->elapsed % 60000 / 1000, 146 id3->elapsed % 60000 / 1000,
148 id3->length / 60000, 147 id3->length / 60000,
149 id3->length % 60000 / 1000 ); 148 id3->length % 60000 / 1000 );
149
150#ifdef HAVE_LCD_BITMAP
150 lcd_puts(0, 6, buffer); 151 lcd_puts(0, 6, buffer);
151 lcd_update(); 152#else
152 } 153 // Display time with the filename scroll only because the screen has room.
154 if (global_settings.wps_display == PLAY_DISPLAY_FILENAME_SCROLL)
155 lcd_puts(0, 1, buffer);
153#endif 156#endif
154 157 lcd_update();
158 }
155 for ( i=0;i<5;i++ ) { 159 for ( i=0;i<5;i++ ) {
156 switch ( button_get(false) ) { 160 switch ( button_get(false) ) {
157 case BUTTON_ON: 161 case BUTTON_ON: