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.tar.gz
rockbox-8d2a4084e1ab35185a599a32464af9b94f306a4f.zip
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 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,
308 dptr->attr |= TREE_ATTR_MOD; 308 dptr->attr |= TREE_ATTR_MOD;
309 else if (!strcasecmp(&entry->d_name[len-5], ".rock")) 309 else if (!strcasecmp(&entry->d_name[len-5], ".rock"))
310 dptr->attr |= TREE_ATTR_ROCK; 310 dptr->attr |= TREE_ATTR_ROCK;
311 } 311 else if (!strcasecmp(&entry->d_name[len-4], ".ucl"))
312 dptr->attr |= TREE_ATTR_UCL; }
312 313
313 /* memorize/compare details about the boot file */ 314 /* memorize/compare details about the boot file */
314 if ((currdir[1] == 0) && !strcmp(entry->d_name, BOOTFILE)) { 315 if ((currdir[1] == 0) && !strcmp(entry->d_name, BOOTFILE)) {
@@ -496,6 +497,10 @@ static int showdir(char *path, int start)
496 icon_type = Mod_Ajz; 497 icon_type = Mod_Ajz;
497 break; 498 break;
498 499
500 case TREE_ATTR_UCL:
501 icon_type = Flashfile;
502 break;
503
499 case TREE_ATTR_ROCK: 504 case TREE_ATTR_ROCK:
500 icon_type = Plugin; 505 icon_type = Plugin;
501 break; 506 break;
@@ -1026,6 +1031,11 @@ static bool dirbrowse(char *root)
1026 case TREE_ATTR_MOD: 1031 case TREE_ATTR_MOD:
1027 rolo_load(buf); 1032 rolo_load(buf);
1028 break; 1033 break;
1034
1035 /* ucl flash file */
1036 case TREE_ATTR_UCL:
1037 plugin_load("/.rockbox/rocks/rockbox_flash.rock",buf);
1038 break;
1029#endif 1039#endif
1030 1040
1031 /* plugin file */ 1041 /* 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 {
36#define TREE_ATTR_FONT 0x800 /* font file */ 36#define TREE_ATTR_FONT 0x800 /* font file */
37#define TREE_ATTR_LNG 0x1000 /* binary lang file */ 37#define TREE_ATTR_LNG 0x1000 /* binary lang file */
38#define TREE_ATTR_ROCK 0x2000 /* binary rockbox plugin */ 38#define TREE_ATTR_ROCK 0x2000 /* binary rockbox plugin */
39#define TREE_ATTR_UCL 0x4000 /* rockbox flash image */
39#define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */ 40#define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */
40 41
41void tree_init(void); 42void tree_init(void);