From 954b73265404075ec4d379ddea14e626113a8677 Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sat, 5 Aug 2006 20:19:10 +0000 Subject: Initial support and use for EEPROM memory on H120 & H140 players when Rockbox firmware has been flashed over original firmware (not yet possible to do). Dircache & tagcache serialization for fast bootup without the need to scan disk when Rockbox is in flash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10464 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/tree.c') diff --git a/apps/tree.c b/apps/tree.c index 7543ceb..fde4da0 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -64,6 +64,7 @@ #include "tagcache.h" #include "yesno.h" #include "gwps-common.h" +#include "eeprom_settings.h" /* gui api */ #include "list.h" @@ -1367,8 +1368,13 @@ void tree_flush(void) #ifdef HAVE_DIRCACHE if (global_settings.dircache) { - if (dircache_is_enabled()) +# ifdef HAVE_EEPROM + if (dircache_is_enabled() && firmware_settings.initialized) + { global_settings.dircache_size = dircache_get_cache_size(); + dircache_save(DIRCACHE_FILE); + } +# endif dircache_disable(); } else @@ -1382,6 +1388,7 @@ void tree_flush(void) void tree_restore(void) { #ifdef HAVE_DIRCACHE + remove(DIRCACHE_FILE); if (global_settings.dircache) { /* Print "Scanning disk..." to the display. */ -- cgit v1.1