forked from len0rd/rockbox
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
This commit is contained in:
parent
f5d9584eac
commit
767d604bcd
6 changed files with 34 additions and 45 deletions
|
|
@ -134,7 +134,6 @@ static void menu_draw(int m)
|
||||||
int menu_lines = MENU_LINES;
|
int menu_lines = MENU_LINES;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lcd_scroll_pause(); /* halt scroll first... */
|
|
||||||
lcd_clear_display(); /* ...then clean the screen */
|
lcd_clear_display(); /* ...then clean the screen */
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */
|
lcd_setmargins(MARGIN_X,MARGIN_Y); /* leave room for cursor and icon */
|
||||||
|
|
@ -289,14 +288,12 @@ bool menu_run(int m)
|
||||||
#endif
|
#endif
|
||||||
case BUTTON_PLAY:
|
case BUTTON_PLAY:
|
||||||
/* Erase current display state */
|
/* Erase current display state */
|
||||||
lcd_scroll_pause(); /* pause is better than stop when
|
|
||||||
are gonna clear the screen anyway */
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
/* if a child returns that USB was used,
|
/* if a child returns that USB was used,
|
||||||
we return immediately */
|
we return immediately */
|
||||||
if (menus[m].items[menus[m].cursor].function()) {
|
if (menus[m].items[menus[m].cursor].function()) {
|
||||||
lcd_scroll_pause(); /* just in case */
|
lcd_stop_scroll(); /* just in case */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -311,7 +308,7 @@ bool menu_run(int m)
|
||||||
case BUTTON_STOP:
|
case BUTTON_STOP:
|
||||||
case BUTTON_MENU:
|
case BUTTON_MENU:
|
||||||
#endif
|
#endif
|
||||||
lcd_scroll_pause();
|
lcd_stop_scroll();
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -458,7 +458,6 @@ bool f2_rec_screen(void)
|
||||||
|
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
lcd_getstringsize("A",&w,&h);
|
lcd_getstringsize("A",&w,&h);
|
||||||
lcd_stop_scroll();
|
|
||||||
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
char* ptr=NULL;
|
char* ptr=NULL;
|
||||||
|
|
@ -573,7 +572,6 @@ bool f3_rec_screen(void)
|
||||||
|
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
lcd_getstringsize("A",&w,&h);
|
lcd_getstringsize("A",&w,&h);
|
||||||
lcd_stop_scroll();
|
|
||||||
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
char* ptr=NULL;
|
char* ptr=NULL;
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ static unsigned char usb_logo[] = {
|
||||||
|
|
||||||
void usb_display_info(void)
|
void usb_display_info(void)
|
||||||
{
|
{
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
@ -132,7 +131,6 @@ int on_screen(void)
|
||||||
char buf[32];
|
char buf[32];
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
lcd_scroll_pause();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
|
|
@ -265,7 +263,6 @@ bool f2_screen(void)
|
||||||
|
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
lcd_getstringsize("A",&w,&h);
|
lcd_getstringsize("A",&w,&h);
|
||||||
lcd_stop_scroll();
|
|
||||||
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
char* ptr=NULL;
|
char* ptr=NULL;
|
||||||
|
|
@ -390,7 +387,6 @@ bool f3_screen(void)
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
bool used = false;
|
bool used = false;
|
||||||
|
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
while (!exit) {
|
while (!exit) {
|
||||||
|
|
|
||||||
|
|
@ -636,7 +636,6 @@ static int onplay_screen(char* dir, char* file)
|
||||||
else
|
else
|
||||||
snprintf(buf, sizeof buf, "%s/%s", dir, file);
|
snprintf(buf, sizeof buf, "%s/%s", dir, file);
|
||||||
|
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
{
|
{
|
||||||
|
|
@ -770,6 +769,8 @@ static int onplay_screen(char* dir, char* file)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen)
|
static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen)
|
||||||
{
|
{
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
|
|
@ -864,6 +865,7 @@ bool dirbrowse(char *root)
|
||||||
bool reload_root = false;
|
bool reload_root = false;
|
||||||
int lastfilter = global_settings.dirfilter;
|
int lastfilter = global_settings.dirfilter;
|
||||||
bool lastsortcase = global_settings.sort_case;
|
bool lastsortcase = global_settings.sort_case;
|
||||||
|
int lastdircursor=-1;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
int fw, fh;
|
int fw, fh;
|
||||||
lcd_getstringsize("A", &fw, &fh);
|
lcd_getstringsize("A", &fw, &fh);
|
||||||
|
|
@ -1275,8 +1277,11 @@ bool dirbrowse(char *root)
|
||||||
|
|
||||||
/* if MP3 filter is on, cut off the extension */
|
/* if MP3 filter is on, cut off the extension */
|
||||||
if(lasti!=i || restore) {
|
if(lasti!=i || restore) {
|
||||||
lasti=i;
|
|
||||||
lcd_stop_scroll();
|
lcd_stop_scroll();
|
||||||
|
if (lastdircursor!=-1)
|
||||||
|
lcd_puts(LINE_X, lastdircursor, dircache[lasti].name);
|
||||||
|
lasti=i;
|
||||||
|
lastdircursor=dircursor;
|
||||||
if (global_settings.dirfilter == SHOW_MUSIC &&
|
if (global_settings.dirfilter == SHOW_MUSIC &&
|
||||||
(dircache[i].attr & (TREE_ATTR_M3U|TREE_ATTR_MPA)))
|
(dircache[i].attr & (TREE_ATTR_M3U|TREE_ATTR_MPA)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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,
|
(id3->elapsed + ff_rewind_count) * 100 / id3->length,
|
||||||
Grow_Right);
|
Grow_Right);
|
||||||
update_line = true;
|
update_line = true;
|
||||||
} else if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) {
|
}
|
||||||
/* peak meter */
|
if (flags & refresh_mode & WPS_REFRESH_PEAK_METER) {
|
||||||
int peak_meter_y;
|
/* peak meter */
|
||||||
int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0;
|
int peak_meter_y;
|
||||||
|
int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0;
|
||||||
|
|
||||||
update_line = true;
|
update_line = true;
|
||||||
peak_meter_y = i * h + offset;
|
peak_meter_y = i * h + offset;
|
||||||
|
|
||||||
/* The user might decide to have the peak meter in the last
|
/* The user might decide to have the peak meter in the last
|
||||||
line so that it is only displayed if no status bar is
|
line so that it is only displayed if no status bar is
|
||||||
visible. If so we neither want do draw nor enable the
|
visible. If so we neither want do draw nor enable the
|
||||||
peak meter. */
|
peak meter. */
|
||||||
if (peak_meter_y + h <= LCD_HEIGHT) {
|
if (peak_meter_y + h <= LCD_HEIGHT) {
|
||||||
/* found a line with a peak meter -> remember that we must
|
/* found a line with a peak meter -> remember that we must
|
||||||
enable it later */
|
enable it later */
|
||||||
enable_pm = true;
|
enable_pm = true;
|
||||||
peak_meter_draw(0, peak_meter_y, LCD_WIDTH,
|
peak_meter_draw(0, peak_meter_y, LCD_WIDTH,
|
||||||
MIN(h, LCD_HEIGHT - peak_meter_y));
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#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) {
|
if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) {
|
||||||
draw_player_progress(id3, ff_rewind_count);
|
draw_player_progress(id3, ff_rewind_count);
|
||||||
}
|
}
|
||||||
if (flags & WPS_REFRESH_SCROLL) {
|
|
||||||
/* scroll line */
|
|
||||||
if (refresh_mode & WPS_REFRESH_SCROLL) {
|
|
||||||
lcd_puts_scroll(0, i, buf);
|
|
||||||
}
|
|
||||||
flags=0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
if (flags & WPS_REFRESH_SCROLL) {
|
||||||
|
/* scroll line */
|
||||||
|
if (refresh_mode & WPS_REFRESH_SCROLL) {
|
||||||
|
lcd_puts_scroll(0, i, buf);
|
||||||
|
}
|
||||||
|
flags=0;
|
||||||
|
}
|
||||||
|
|
||||||
/* dynamic / static line */
|
/* dynamic / static line */
|
||||||
if ((flags & refresh_mode & WPS_REFRESH_DYNAMIC) ||
|
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);
|
wps_refresh(id3, 0, WPS_REFRESH_ALL);
|
||||||
status_draw();
|
status_draw();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,6 @@ void player_change_volume(int button)
|
||||||
|
|
||||||
void display_keylock_text(bool locked)
|
void display_keylock_text(bool locked)
|
||||||
{
|
{
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
|
@ -131,7 +130,6 @@ void display_keylock_text(bool locked)
|
||||||
|
|
||||||
void display_mute_text(bool muted)
|
void display_mute_text(bool muted)
|
||||||
{
|
{
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
|
@ -158,7 +156,6 @@ static int browse_id3(void)
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
char scroll_text[MAX_PATH];
|
char scroll_text[MAX_PATH];
|
||||||
|
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
lcd_puts(0, 0, str(LANG_ID3_INFO));
|
lcd_puts(0, 0, str(LANG_ID3_INFO));
|
||||||
lcd_puts(0, 1, str(LANG_ID3_SCREEN));
|
lcd_puts(0, 1, str(LANG_ID3_SCREEN));
|
||||||
|
|
@ -167,7 +164,6 @@ static int browse_id3(void)
|
||||||
|
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
lcd_stop_scroll();
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
switch (menu_pos)
|
switch (menu_pos)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue