diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-10-24 23:19:13 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-10-24 23:19:13 +0000 |
commit | d203d4bfb10419d60953a3216b97c0e99340030e (patch) | |
tree | abb0e47e735767bb4e6460be253b8e219ce544be | |
parent | 0e8169c12a2c803de595dd8a6d02923a54ae8268 (diff) | |
download | rockbox-d203d4bfb10419d60953a3216b97c0e99340030e.tar.gz rockbox-d203d4bfb10419d60953a3216b97c0e99340030e.zip |
Leave sub-browsers after returning from usb mode, to avoid confusing display of the drive root.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5340 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/tree.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/tree.c b/apps/tree.c index 745b4ebef6..cf12c4abc2 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -1225,7 +1225,14 @@ static bool dirbrowse(const char *root, const int *dirfilter) | |||
1225 | /* plugin file */ | 1225 | /* plugin file */ |
1226 | case TREE_ATTR_ROCK: | 1226 | case TREE_ATTR_ROCK: |
1227 | if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED) | 1227 | if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED) |
1228 | reload_root = true; | 1228 | { |
1229 | if(*dirfilter > NUM_FILTER_MODES) | ||
1230 | /* leave sub-browsers after usb, doing | ||
1231 | otherwise might be confusing to the user */ | ||
1232 | exit_func = true; | ||
1233 | else | ||
1234 | reload_root = true; | ||
1235 | } | ||
1229 | else | 1236 | else |
1230 | restore = true; | 1237 | restore = true; |
1231 | break; | 1238 | break; |
@@ -1487,7 +1494,14 @@ static bool dirbrowse(const char *root, const int *dirfilter) | |||
1487 | 1494 | ||
1488 | default: | 1495 | default: |
1489 | if(default_event_handler(button) == SYS_USB_CONNECTED) | 1496 | if(default_event_handler(button) == SYS_USB_CONNECTED) |
1490 | reload_root = true; | 1497 | { |
1498 | if(*dirfilter > NUM_FILTER_MODES) | ||
1499 | /* leave sub-browsers after usb, doing otherwise | ||
1500 | might be confusing to the user */ | ||
1501 | exit_func = true; | ||
1502 | else | ||
1503 | reload_root = true; | ||
1504 | } | ||
1491 | break; | 1505 | break; |
1492 | } | 1506 | } |
1493 | 1507 | ||