forked from len0rd/rockbox
Quick fix for the edit screen in the random_folder_advance_config plugin, no more blank screen and it now shows the correct directory count
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11161 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8055825312
commit
d8a2165f78
2 changed files with 14 additions and 7 deletions
|
@ -22,6 +22,10 @@ stopwatch.c
|
|||
vbrfix.c
|
||||
viewer.c
|
||||
|
||||
#ifdef CPU_COLDFIRE
|
||||
sampr_test.c
|
||||
#endif
|
||||
|
||||
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)) && !defined(SIMULATOR)
|
||||
wavplay.c
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,7 @@ struct file_format *list = NULL;
|
|||
|
||||
#endif
|
||||
|
||||
void update_screen(void)
|
||||
void update_screen(bool clear)
|
||||
{
|
||||
char buf[15];
|
||||
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) /* always bitmap */
|
||||
|
@ -62,12 +62,14 @@ void update_screen(void)
|
|||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
rb->snprintf(buf,15,"Folders: %d",dirs_count);
|
||||
if(clear)
|
||||
rb->screens[i]->clear_display();
|
||||
rb->screens[i]->putsxy(0,0,buf);
|
||||
rb->screens[i]->update();
|
||||
}
|
||||
#else
|
||||
rb->snprintf(buf,15,"Folders: %d",dirs_count);
|
||||
if(clear)
|
||||
rb->lcd_clear_display();
|
||||
rb->lcd_puts(0,0,buf);
|
||||
#endif
|
||||
|
@ -111,7 +113,7 @@ void traversedir(char* location, char* name)
|
|||
}
|
||||
}
|
||||
if (*rb->current_tick - lasttick > (HZ/2)) {
|
||||
update_screen();
|
||||
update_screen(false);
|
||||
lasttick = *rb->current_tick;
|
||||
if (rb->action_userabort(TIMEOUT_NOBLOCK))
|
||||
{
|
||||
|
@ -137,7 +139,7 @@ void generate(void)
|
|||
return;
|
||||
}
|
||||
#ifndef HAVE_LCD_CHARCELLS
|
||||
update_screen();
|
||||
update_screen(true);
|
||||
#endif
|
||||
lasttick = *rb->current_tick;
|
||||
|
||||
|
@ -168,6 +170,7 @@ void edit_list(void)
|
|||
rb->read(fd,buffer,buffer_size);
|
||||
rb->close(fd);
|
||||
list = (struct file_format *)buffer;
|
||||
dirs_count = list->count;
|
||||
|
||||
rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1);
|
||||
rb->gui_synclist_set_icon_callback(&lists,NULL);
|
||||
|
@ -177,10 +180,10 @@ void edit_list(void)
|
|||
|
||||
while (!exit)
|
||||
{
|
||||
rb->gui_synclist_draw(&lists);
|
||||
#ifndef HAVE_LCD_CHARCELLS
|
||||
update_screen();
|
||||
update_screen(true);
|
||||
#endif
|
||||
rb->gui_synclist_draw(&lists);
|
||||
button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK);
|
||||
if (rb->gui_synclist_do_button(&lists,button))
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue