summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2003-07-27 22:08:42 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2003-07-27 22:08:42 +0000
commit8d2a4084e1ab35185a599a32464af9b94f306a4f (patch)
tree72a3f3c7e3e836b2bc4f4940ca5fcc3c6e096c34
parent9d3e5c6d1d44d7ec8a8594ff4f937e6f7170e13a (diff)
downloadrockbox-8d2a4084e1ab35185a599a32464af9b94f306a4f.zip
rockbox-8d2a4084e1ab35185a599a32464af9b94f306a4f.tar.gz
rockbox-8d2a4084e1ab35185a599a32464af9b94f306a4f.tar.bz2
rockbox-8d2a4084e1ab35185a599a32464af9b94f306a4f.tar.xz
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
-rw-r--r--apps/tree.c12
-rw-r--r--apps/tree.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index d009f4e..eac19a3 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 66e83bc..397fb39 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);