From b00ced79799491cc152b5a713887d90bb6ffeef4 Mon Sep 17 00:00:00 2001 From: Jerome Kuptz Date: Fri, 28 Jun 2002 04:28:59 +0000 Subject: 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 --- apps/wps.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'apps') 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) lcd_puts_scroll(0,0, (++szLast)); else lcd_puts_scroll(0,0, id3->path); - break; } case PLAY_DISPLAY_DEFAULT: @@ -122,6 +121,7 @@ void wps_show(void) while ( 1 ) { int i; + char buffer[32]; if ( ( id3->length != lastlength ) || ( id3->filesize != lastsize ) || @@ -138,20 +138,24 @@ void wps_show(void) lastalbum = id3->album[0]; lasttitle = id3->title[0]; } - -#ifdef HAVE_LCD_BITMAP + + if (playing) { - char buffer[32]; snprintf(buffer,sizeof(buffer), "Time: %d:%02d / %d:%02d", id3->elapsed / 60000, id3->elapsed % 60000 / 1000, id3->length / 60000, id3->length % 60000 / 1000 ); + +#ifdef HAVE_LCD_BITMAP lcd_puts(0, 6, buffer); - lcd_update(); - } +#else + // Display time with the filename scroll only because the screen has room. + if (global_settings.wps_display == PLAY_DISPLAY_FILENAME_SCROLL) + lcd_puts(0, 1, buffer); #endif - + lcd_update(); + } for ( i=0;i<5;i++ ) { switch ( button_get(false) ) { case BUTTON_ON: -- cgit v1.2.3