mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
only menu and prev are treated in directories with no entries
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1064 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ac7b23f7ae
commit
1a17d356f2
1 changed files with 15 additions and 1 deletions
16
apps/tree.c
16
apps/tree.c
|
@ -232,6 +232,7 @@ bool dirbrowse(char *root)
|
||||||
{
|
{
|
||||||
char buf[255];
|
char buf[255];
|
||||||
int i;
|
int i;
|
||||||
|
int button;
|
||||||
|
|
||||||
memcpy(currdir,root,sizeof(currdir));
|
memcpy(currdir,root,sizeof(currdir));
|
||||||
numentries = showdir(root, start);
|
numentries = showdir(root, start);
|
||||||
|
@ -245,7 +246,20 @@ bool dirbrowse(char *root)
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
switch(button_get(true)) {
|
button = button_get(true);
|
||||||
|
if(!numentries) {
|
||||||
|
switch(button) {
|
||||||
|
case TREE_MENU:
|
||||||
|
case TREE_PREV:
|
||||||
|
/* let it go */
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch(button) {
|
||||||
case TREE_EXIT:
|
case TREE_EXIT:
|
||||||
i=strlen(currdir);
|
i=strlen(currdir);
|
||||||
if (i>1) {
|
if (i>1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue