From 8d2a4084e1ab35185a599a32464af9b94f306a4f Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Sun, 27 Jul 2003 22:08:42 +0000 Subject: Lee Marlow's patch: UCL files can be "played" to call the flash plugin git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3896 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 12 +++++++++++- apps/tree.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/tree.c b/apps/tree.c index d009f4eb68..eac19a3f91 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -308,7 +308,8 @@ struct entry* load_and_sort_directory(char *dirname, int dirfilter, dptr->attr |= TREE_ATTR_MOD; else if (!strcasecmp(&entry->d_name[len-5], ".rock")) dptr->attr |= TREE_ATTR_ROCK; - } + else if (!strcasecmp(&entry->d_name[len-4], ".ucl")) + dptr->attr |= TREE_ATTR_UCL; } /* memorize/compare details about the boot file */ if ((currdir[1] == 0) && !strcmp(entry->d_name, BOOTFILE)) { @@ -496,6 +497,10 @@ static int showdir(char *path, int start) icon_type = Mod_Ajz; break; + case TREE_ATTR_UCL: + icon_type = Flashfile; + break; + case TREE_ATTR_ROCK: icon_type = Plugin; break; @@ -1026,6 +1031,11 @@ static bool dirbrowse(char *root) case TREE_ATTR_MOD: rolo_load(buf); break; + + /* ucl flash file */ + case TREE_ATTR_UCL: + plugin_load("/.rockbox/rocks/rockbox_flash.rock",buf); + break; #endif /* plugin file */ diff --git a/apps/tree.h b/apps/tree.h index 66e83bc8f0..397fb3940d 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -36,6 +36,7 @@ struct entry { #define TREE_ATTR_FONT 0x800 /* font file */ #define TREE_ATTR_LNG 0x1000 /* binary lang file */ #define TREE_ATTR_ROCK 0x2000 /* binary rockbox plugin */ +#define TREE_ATTR_UCL 0x4000 /* rockbox flash image */ #define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */ void tree_init(void); -- cgit v1.2.3