mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Dircache: Allow dircache to be enabled without reboot.
Also add two dircache function, one of which does what dircache_disable() did previously as this now also frees the dircache buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30393 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c1ae789108
commit
7e14b935df
5 changed files with 77 additions and 41 deletions
|
|
@ -189,16 +189,14 @@ static int dircache_callback(int action,const struct menu_item_ex *this_item)
|
|||
switch (action)
|
||||
{
|
||||
case ACTION_EXIT_MENUITEM: /* on exit */
|
||||
switch (global_settings.dircache)
|
||||
if (global_settings.dircache && !dircache_is_enabled())
|
||||
{
|
||||
case true:
|
||||
if (!dircache_is_enabled())
|
||||
splash(HZ*2, ID2P(LANG_PLEASE_REBOOT));
|
||||
break;
|
||||
case false:
|
||||
if (dircache_is_enabled())
|
||||
dircache_disable();
|
||||
break;
|
||||
if (dircache_build(0) < 0)
|
||||
splash(HZ*2, ID2P(LANG_PLEASE_REBOOT));
|
||||
}
|
||||
else if (!global_settings.dircache && dircache_is_enabled())
|
||||
{
|
||||
dircache_disable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue