1
0
Fork 0
forked from len0rd/rockbox

Fix dircache not saving the last size (Caused the Scanning disk splash

to show every bot).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11734 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2006-12-12 10:45:34 +00:00
parent 972b2dbcab
commit 6581146eb1
3 changed files with 17 additions and 12 deletions

View file

@ -161,8 +161,9 @@ int init_dircache(bool preinit)
{ {
backlight_on(); backlight_on();
show_logo(); show_logo();
settings_save();
} }
global_settings.dircache_size = dircache_get_cache_size();
settings_save();
} }
return result; return result;

View file

@ -555,8 +555,8 @@ bool settings_parseline(char* line, char** name, char** value)
static void system_flush(void) static void system_flush(void)
{ {
call_ata_idle_notifys(true); /*doesnt work on usb and shutdown from ata thread */
tree_flush(); tree_flush();
call_ata_idle_notifys(true); /*doesnt work on usb and shutdown from ata thread */
} }
static void system_restore(void) static void system_restore(void)

View file

@ -1437,6 +1437,8 @@ void tree_flush(void)
#endif #endif
#ifdef HAVE_DIRCACHE #ifdef HAVE_DIRCACHE
{
int old_val = global_settings.dircache_size;
if (global_settings.dircache) if (global_settings.dircache)
{ {
global_settings.dircache_size = dircache_get_cache_size(); global_settings.dircache_size = dircache_get_cache_size();
@ -1450,7 +1452,9 @@ void tree_flush(void)
{ {
global_settings.dircache_size = 0; global_settings.dircache_size = 0;
} }
if (old_val != global_settings.dircache_size)
settings_save(); settings_save();
}
#endif #endif
} }