Index: apps/main.c =================================================================== --- apps/main.c (revision 14207) +++ apps/main.c (working copy) @@ -253,7 +253,40 @@ lcd_remote_init(); #endif font_init(); + + /* just for the sim. This mimics the behaviour on target */ +#ifdef HAVE_LCD_BITMAP + int fd4; + int timer4=0; + fd4 = open("/.rockbox/splash.cfg", O_RDONLY); + if(fd4 > 0) + { + char splashbuffer4[2]; + read_line(fd4,splashbuffer4,2); + close(fd4); + timer4 = atoi(splashbuffer4); + static fb_data save_buffer4[LCD_WIDTH*LCD_HEIGHT*sizeof(fb_data)]; + struct bitmap bm4; + bool ret4; + bm4.data = (char*)save_buffer4; + ret4 = read_bmp_file( "/.rockbox/splash.bmp", &bm4, LCD_WIDTH*LCD_HEIGHT*sizeof(fb_data), FORMAT_NATIVE | FORMAT_DITHER); + if(ret4 > 0){ + lcd_clear_display(); + lcd_bitmap(save_buffer4, 0, 0, bm4.width, bm4.height); + lcd_update(); + sleep(HZ*timer4); + } + }else{ + /* show the original RB logo */ + show_logo(); + } + +#endif + +#ifndef HAVE_LCD_BITMAP show_logo(); +#endif + button_init(); backlight_init(); lang_init(); @@ -341,7 +374,11 @@ #endif font_init(); +#ifndef HAVE_LCD_BITMAP +/* like this for the custom splash screen */ show_logo(); +#endif + lang_init(); #ifdef DEBUG @@ -490,6 +527,36 @@ gui_sync_wps_init(); settings_apply(); + + #ifdef HAVE_LCD_BITMAP +/* custom user splash screen here. */ +/* currently there is a small delay before the splash shows */ + int fd2; + int timer=0; + fd2 = open("/.rockbox/splash.cfg", O_RDONLY); + if(fd2 > 0) + { + char splashbuffer[2]; + read_line(fd2,splashbuffer,2); + close(fd2); + timer = atoi(splashbuffer); + static fb_data save_buffer2[LCD_WIDTH*LCD_HEIGHT*sizeof(fb_data)]; + struct bitmap bm2; + bool ret2; + bm2.data = (char*)save_buffer2; + ret2 = read_bmp_file( "/.rockbox/splash.bmp", &bm2, LCD_WIDTH*LCD_HEIGHT*sizeof(fb_data), FORMAT_NATIVE | FORMAT_DITHER); + if(ret2 > 0){ + lcd_clear_display(); + lcd_bitmap(save_buffer2, 0, 0, bm2.width, bm2.height); + lcd_update(); + sleep(HZ*timer); + } + }else{ + show_logo(); + } +/* custom user splash screen here */ +#endif + init_dircache(false); #ifdef HAVE_TAGCACHE init_tagcache();