forked from len0rd/rockbox
Added the 'only return to root if current dir no longer exists' functionality to the plugin handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6487 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fa924f1b05
commit
32be590e6d
3 changed files with 9 additions and 13 deletions
|
|
@ -447,7 +447,7 @@ int db_enter(struct tree_context* c)
|
|||
case searchsongs:
|
||||
c->dirlevel--;
|
||||
if (db_play_folder(c) >= 0)
|
||||
rc = 3;
|
||||
rc = 2;
|
||||
break;
|
||||
|
||||
case search:
|
||||
|
|
|
|||
|
|
@ -310,7 +310,6 @@ int ft_enter(struct tree_context* c)
|
|||
char buf[MAX_PATH];
|
||||
struct entry *dircache = c->dircache;
|
||||
struct entry* file = &dircache[c->dircursor + c->dirstart];
|
||||
bool reload_root = false;
|
||||
bool reload_dir = false;
|
||||
bool start_wps = false;
|
||||
bool exit_func = false;
|
||||
|
|
@ -431,7 +430,7 @@ int ft_enter(struct tree_context* c)
|
|||
otherwise might be confusing to the user */
|
||||
exit_func = true;
|
||||
else
|
||||
reload_root = true;
|
||||
reload_dir = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -441,7 +440,7 @@ int ft_enter(struct tree_context* c)
|
|||
if (plugin)
|
||||
{
|
||||
if (plugin_load(plugin,buf) == PLUGIN_USB_CONNECTED)
|
||||
reload_root = true;
|
||||
reload_dir = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -470,12 +469,10 @@ int ft_enter(struct tree_context* c)
|
|||
|
||||
if (reload_dir)
|
||||
rc = 1;
|
||||
if (reload_root)
|
||||
rc = 2;
|
||||
if (start_wps)
|
||||
rc = 3;
|
||||
rc = 2;
|
||||
if (exit_func)
|
||||
rc = 4;
|
||||
rc = 3;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -518,7 +515,7 @@ int ft_exit(struct tree_context* c)
|
|||
}
|
||||
|
||||
if (exit_func)
|
||||
rc = 4;
|
||||
rc = 3;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -765,9 +765,8 @@ static bool dirbrowse(void)
|
|||
switch (i)
|
||||
{
|
||||
case 1: reload_dir = true; break;
|
||||
case 2: reload_root = true; break;
|
||||
case 3: start_wps = true; break;
|
||||
case 4: exit_func = true; break;
|
||||
case 2: start_wps = true; break;
|
||||
case 3: exit_func = true; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
|
@ -801,7 +800,7 @@ static bool dirbrowse(void)
|
|||
if (id3db)
|
||||
db_exit(&tc);
|
||||
else
|
||||
if (ft_exit(&tc) == 4)
|
||||
if (ft_exit(&tc) == 3)
|
||||
exit_func = true;
|
||||
|
||||
restore = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue