diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-09 07:41:28 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-09 07:41:28 +0000 |
| commit | c2eb67bc9f913b6bb56b9e1b7b54ddc5516cee7c (patch) | |
| tree | 4bc8c9e37c22f5e5b58ca85c19c6bd3fe0361000 | |
| parent | 29b9146aa78568a3e8a4969708856c82b695004a (diff) | |
| download | rockbox-c2eb67bc9f913b6bb56b9e1b7b54ddc5516cee7c.zip rockbox-c2eb67bc9f913b6bb56b9e1b7b54ddc5516cee7c.tar.gz rockbox-c2eb67bc9f913b6bb56b9e1b7b54ddc5516cee7c.tar.bz2 rockbox-c2eb67bc9f913b6bb56b9e1b7b54ddc5516cee7c.tar.xz | |
Unload tagcache from ram when entering USB mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10496 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/tagcache.c | 7 | ||||
| -rw-r--r-- | apps/tagcache.h | 1 | ||||
| -rw-r--r-- | apps/tree.c | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 4812198..4bcf25b 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -3295,6 +3295,13 @@ static void load_ramcache(void) cpu_boost(false); } + +void tagcache_unload_ramcache(void) +{ + stat.ramcache = false; + /* Just to make sure there is no statefile present. */ + remove(TAGCACHE_STATEFILE); +} #endif static bool check_all_headers(void) diff --git a/apps/tagcache.h b/apps/tagcache.h index d5ce772..b27d804 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -155,6 +155,7 @@ bool tagcache_prepare_shutdown(void); #ifdef HAVE_TC_RAMCACHE bool tagcache_is_ramcache(void); bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); +void tagcache_unload_ramcache(void); #endif void tagcache_init(void); bool tagcache_is_initialized(void); diff --git a/apps/tree.c b/apps/tree.c index 7b553a5..1dbe922 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -1365,6 +1365,10 @@ void tree_flush(void) tagcache_stop_scan(); playlist_shutdown(); +#ifdef HAVE_TC_RAMCACHE + tagcache_unload_ramcache(); +#endif + #ifdef HAVE_DIRCACHE if (global_settings.dircache) { @@ -1387,6 +1391,10 @@ void tree_flush(void) void tree_restore(void) { +#ifdef HAVE_EEPROM + firmware_settings.disk_clean = false; +#endif + #ifdef HAVE_DIRCACHE remove(DIRCACHE_FILE); if (global_settings.dircache) |