summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-05-24 07:31:23 +0000
committerJens Arnold <amiconn@rockbox.org>2006-05-24 07:31:23 +0000
commitb09df8019a2d9dbd1f235d6772714e5d642f7197 (patch)
tree770e61f144222b71bb6719ce2389c1e6960243c5
parent972a2196763ce15fcbb331058c88580a8fc67128 (diff)
downloadrockbox-b09df8019a2d9dbd1f235d6772714e5d642f7197.tar.gz
rockbox-b09df8019a2d9dbd1f235d6772714e5d642f7197.tar.bz2
rockbox-b09df8019a2d9dbd1f235d6772714e5d642f7197.zip
(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
-rw-r--r--apps/main.c45
1 files changed, 18 insertions, 27 deletions
diff --git a/apps/main.c b/apps/main.c
index 5966208771..84c77ab1c9 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -142,44 +142,35 @@ void init_dircache(void)
void init_tagcache(void)
{
-#ifdef HAVE_LCD_BITMAP
- int font_w, font_h;
-#endif
-
+ bool clear = false;
+
tagcache_init();
while (!tagcache_is_initialized())
{
-#ifdef HAVE_LCD_BITMAP
- char buf[64];
- int ret;
-
- ret = tagcache_get_commit_step();
+#ifdef HAVE_LCD_CHARCELLS
+ char buf[32];
+#endif
+ int ret = tagcache_get_commit_step();
+
if (ret > 0)
{
- lcd_setfont(FONT_SYSFIXED);
- snprintf(buf, sizeof buf, "%s [%d/%d]",
- str(LANG_TAGCACHE_INIT), ret, TAG_COUNT);
-
- /* Print "Scanning disk..." to the display. */
- lcd_getstringsize("A", &font_w, &font_h);
- lcd_putsxy((LCD_WIDTH/2) - ((strlen(buf)*font_w)/2),
- LCD_HEIGHT-font_h*3, buf);
- lcd_update();
- }
+#ifdef HAVE_LCD_BITMAP
+ gui_syncsplash(0, true, "%s [%d/%d]",
+ str(LANG_TAGCACHE_INIT), ret, TAG_COUNT);
+#else
+ lcd_double_height(false);
+ snprintf(buf, sizeof(buf), " TC [%d/%d]", ret, TAG_COUNT);
+ lcd_puts(0, 1, buf);
#endif
+ clear = true;
+ }
sleep(HZ/4);
}
-
tagtree_init();
-#ifdef HAVE_LCD_BITMAP
- /* Clean the text when we are done. */
- 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
+ if (clear)
+ show_logo();
}
#ifdef SIMULATOR