From 767d604bcd839ef996aad8b9ab1e394aca26a95c Mon Sep 17 00:00:00 2001 From: Kjell Ericson Date: Thu, 23 Jan 2003 14:28:16 +0000 Subject: Removed unnecessary calls to lcd_stop_scroll(). Changed all lcd_scroll_pause() to lcd_stop_scroll(). Updated the tree system for new scroll-behaviour. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3154 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps-display.c | 55 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) (limited to 'apps/wps-display.c') diff --git a/apps/wps-display.c b/apps/wps-display.c index 4ea2a0bed2..dfbc6d2cb6 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c @@ -670,29 +670,25 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo (id3->elapsed + ff_rewind_count) * 100 / id3->length, Grow_Right); update_line = true; - } else if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { - /* peak meter */ - int peak_meter_y; - int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; - - update_line = true; - peak_meter_y = i * h + offset; - - /* The user might decide to have the peak meter in the last - line so that it is only displayed if no status bar is - visible. If so we neither want do draw nor enable the - peak meter. */ - if (peak_meter_y + h <= LCD_HEIGHT) { - /* found a line with a peak meter -> remember that we must - enable it later */ - enable_pm = true; - peak_meter_draw(0, peak_meter_y, LCD_WIDTH, - MIN(h, LCD_HEIGHT - peak_meter_y)); - } - } else if (flags & WPS_REFRESH_SCROLL) { - /* scroll line */ - if (refresh_mode & WPS_REFRESH_SCROLL) { - lcd_puts_scroll(0, i, buf); + } + if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) { + /* peak meter */ + int peak_meter_y; + int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; + + update_line = true; + peak_meter_y = i * h + offset; + + /* The user might decide to have the peak meter in the last + line so that it is only displayed if no status bar is + visible. If so we neither want do draw nor enable the + peak meter. */ + if (peak_meter_y + h <= LCD_HEIGHT) { + /* found a line with a peak meter -> remember that we must + enable it later */ + enable_pm = true; + peak_meter_draw(0, peak_meter_y, LCD_WIDTH, + MIN(h, LCD_HEIGHT - peak_meter_y)); } } #else @@ -700,14 +696,14 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) { draw_player_progress(id3, ff_rewind_count); } +#endif if (flags & WPS_REFRESH_SCROLL) { - /* scroll line */ - if (refresh_mode & WPS_REFRESH_SCROLL) { - lcd_puts_scroll(0, i, buf); - } - flags=0; + /* scroll line */ + if (refresh_mode & WPS_REFRESH_SCROLL) { + lcd_puts_scroll(0, i, buf); + } + flags=0; } -#endif /* dynamic / static line */ if ((flags & refresh_mode & WPS_REFRESH_DYNAMIC) || @@ -767,6 +763,7 @@ bool wps_display(struct mp3entry* id3) } } } + yield(); wps_refresh(id3, 0, WPS_REFRESH_ALL); status_draw(); lcd_update(); -- cgit v1.2.3