summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/apps/main.c b/apps/main.c
index 09c1e4bea5..915aec27d3 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -60,6 +60,7 @@
60#include "misc.h" 60#include "misc.h"
61#include "database.h" 61#include "database.h"
62#include "dircache.h" 62#include "dircache.h"
63#include "tagcache.h"
63#include "lang.h" 64#include "lang.h"
64#include "string.h" 65#include "string.h"
65#include "splash.h" 66#include "splash.h"
@@ -138,6 +139,29 @@ void init_dircache(void)
138# define init_dircache(...) 139# define init_dircache(...)
139#endif 140#endif
140 141
142void init_tagcache(void)
143{
144 int font_w, font_h;
145
146#ifdef HAVE_LCD_BITMAP
147 /* Print "Scanning disk..." to the display. */
148 lcd_getstringsize("A", &font_w, &font_h);
149 lcd_putsxy((LCD_WIDTH/2) - ((strlen(str(LANG_TAGCACHE_INIT))*font_w)/2),
150 LCD_HEIGHT-font_h*3, str(LANG_TAGCACHE_INIT));
151 lcd_update();
152#endif
153
154 tagcache_init();
155
156#ifdef HAVE_LCD_BITMAP
157 /* Clean the text when we are done. */
158 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
159 lcd_fillrect(0, LCD_HEIGHT-font_h*3, LCD_WIDTH, font_h);
160 lcd_set_drawmode(DRMODE_SOLID);
161 lcd_update();
162#endif
163}
164
141#ifdef SIMULATOR 165#ifdef SIMULATOR
142 166
143void init(void) 167void init(void)
@@ -162,6 +186,7 @@ void init(void)
162 gui_sync_wps_init(); 186 gui_sync_wps_init();
163 settings_apply(); 187 settings_apply();
164 init_dircache(); 188 init_dircache();
189 init_tagcache();
165 sleep(HZ/2); 190 sleep(HZ/2);
166 tree_init(); 191 tree_init();
167 playlist_init(); 192 playlist_init();
@@ -350,6 +375,7 @@ void init(void)
350 375
351 376
352 init_dircache(); 377 init_dircache();
378 init_tagcache();
353 gui_sync_wps_init(); 379 gui_sync_wps_init();
354 settings_apply(); 380 settings_apply();
355 381
@@ -379,7 +405,6 @@ void init(void)
379#endif 405#endif
380 talk_init(); 406 talk_init();
381 /* runtime database has to be initialized after audio_init() */ 407 /* runtime database has to be initialized after audio_init() */
382 rundb_init();
383 cpu_boost(false); 408 cpu_boost(false);
384 409
385#ifdef AUTOROCK 410#ifdef AUTOROCK