summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/main.c')
-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)
142 142
143void init_tagcache(void) 143void init_tagcache(void)
144{ 144{
145#ifdef HAVE_LCD_BITMAP 145 bool clear = false;
146 int font_w, font_h; 146
147#endif
148
149 tagcache_init(); 147 tagcache_init();
150 148
151 while (!tagcache_is_initialized()) 149 while (!tagcache_is_initialized())
152 { 150 {
153#ifdef HAVE_LCD_BITMAP 151#ifdef HAVE_LCD_CHARCELLS
154 char buf[64]; 152 char buf[32];
155 int ret; 153#endif
156 154 int ret = tagcache_get_commit_step();
157 ret = tagcache_get_commit_step(); 155
158 if (ret > 0) 156 if (ret > 0)
159 { 157 {
160 lcd_setfont(FONT_SYSFIXED); 158#ifdef HAVE_LCD_BITMAP
161 snprintf(buf, sizeof buf, "%s [%d/%d]", 159 gui_syncsplash(0, true, "%s [%d/%d]",
162 str(LANG_TAGCACHE_INIT), ret, TAG_COUNT); 160 str(LANG_TAGCACHE_INIT), ret, TAG_COUNT);
163 161#else
164 /* Print "Scanning disk..." to the display. */ 162 lcd_double_height(false);
165 lcd_getstringsize("A", &font_w, &font_h); 163 snprintf(buf, sizeof(buf), " TC [%d/%d]", ret, TAG_COUNT);
166 lcd_putsxy((LCD_WIDTH/2) - ((strlen(buf)*font_w)/2), 164 lcd_puts(0, 1, buf);
167 LCD_HEIGHT-font_h*3, buf);
168 lcd_update();
169 }
170#endif 165#endif
166 clear = true;
167 }
171 sleep(HZ/4); 168 sleep(HZ/4);
172 } 169 }
173
174 tagtree_init(); 170 tagtree_init();
175 171
176#ifdef HAVE_LCD_BITMAP 172 if (clear)
177 /* Clean the text when we are done. */ 173 show_logo();
178 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
179 lcd_fillrect(0, LCD_HEIGHT-font_h*3, LCD_WIDTH, font_h);
180 lcd_set_drawmode(DRMODE_SOLID);
181 lcd_update();
182#endif
183} 174}
184 175
185#ifdef SIMULATOR 176#ifdef SIMULATOR