forked from len0rd/rockbox
(1) Tagcache commit message now uses splash on bitmap displays: * Uses user font (better readability because of font size, message can be localised in languages with non-latin script). * Solves mysterious screen clear observed on Ondio (caused by an uninitialised variable when there was nothing to commit). * Smaller code. (2) Tagcahce commit message implemented for Player.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9981 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
972a219676
commit
b09df8019a
1 changed files with 18 additions and 27 deletions
41
apps/main.c
41
apps/main.c
|
|
@ -142,44 +142,35 @@ void init_dircache(void)
|
||||||
|
|
||||||
void init_tagcache(void)
|
void init_tagcache(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
bool clear = false;
|
||||||
int font_w, font_h;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tagcache_init();
|
tagcache_init();
|
||||||
|
|
||||||
while (!tagcache_is_initialized())
|
while (!tagcache_is_initialized())
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
char buf[64];
|
char buf[32];
|
||||||
int ret;
|
#endif
|
||||||
|
int ret = tagcache_get_commit_step();
|
||||||
|
|
||||||
ret = tagcache_get_commit_step();
|
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
{
|
{
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
#ifdef HAVE_LCD_BITMAP
|
||||||
snprintf(buf, sizeof buf, "%s [%d/%d]",
|
gui_syncsplash(0, true, "%s [%d/%d]",
|
||||||
str(LANG_TAGCACHE_INIT), ret, TAG_COUNT);
|
str(LANG_TAGCACHE_INIT), ret, TAG_COUNT);
|
||||||
|
#else
|
||||||
/* Print "Scanning disk..." to the display. */
|
lcd_double_height(false);
|
||||||
lcd_getstringsize("A", &font_w, &font_h);
|
snprintf(buf, sizeof(buf), " TC [%d/%d]", ret, TAG_COUNT);
|
||||||
lcd_putsxy((LCD_WIDTH/2) - ((strlen(buf)*font_w)/2),
|
lcd_puts(0, 1, buf);
|
||||||
LCD_HEIGHT-font_h*3, buf);
|
|
||||||
lcd_update();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
clear = true;
|
||||||
|
}
|
||||||
sleep(HZ/4);
|
sleep(HZ/4);
|
||||||
}
|
}
|
||||||
|
|
||||||
tagtree_init();
|
tagtree_init();
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
if (clear)
|
||||||
/* Clean the text when we are done. */
|
show_logo();
|
||||||
lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
|
||||||
lcd_fillrect(0, LCD_HEIGHT-font_h*3, LCD_WIDTH, font_h);
|
|
||||||
lcd_set_drawmode(DRMODE_SOLID);
|
|
||||||
lcd_update();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SIMULATOR
|
#ifdef SIMULATOR
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue