From 66b45eeb596af1bd950832cd16b3752430f691c4 Mon Sep 17 00:00:00 2001 From: Henrik Backe Date: Fri, 10 Sep 2004 20:51:12 +0000 Subject: Added check for missing .rockbox directory to playlist code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5063 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'apps/tree.c') diff --git a/apps/tree.c b/apps/tree.c index 7be258c4db..90d7010d03 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -120,20 +120,27 @@ static bool boot_changed = false; static bool start_wps = false; static bool dirbrowse(const char *root, const int *dirfilter); -void browse_root(void) +bool check_rockboxdir(void) { - filetype_init(); - -#ifndef SIMULATOR DIR *dir = opendir(ROCKBOX_DIR); if(!dir) { lcd_clear_display(); - splash(HZ*5, true, str(LANG_NO_ROCKBOX_DIR)); + splash(HZ*2, true, str(LANG_NO_ROCKBOX_DIR)); lcd_clear_display(); - splash(HZ*5, true, str(LANG_INSTALLATION_INCOMPLETE)); + splash(HZ*2, true, str(LANG_INSTALLATION_INCOMPLETE)); + return false; } closedir(dir); + return true; +} + +void browse_root(void) +{ + filetype_init(); + check_rockboxdir(); + +#ifndef SIMULATOR dirbrowse("/", &global_settings.dirfilter); #else -- cgit v1.2.3