summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tree.c14
-rw-r--r--apps/tree.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 6424b3e509..fb62b0ede8 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -310,8 +310,13 @@ struct entry* load_and_sort_directory(char *dirname, int *dirfilter,
310 else if (!strcasecmp(&entry->d_name[len-5], ".rock")) 310 else if (!strcasecmp(&entry->d_name[len-5], ".rock"))
311 dptr->attr |= TREE_ATTR_ROCK; 311 dptr->attr |= TREE_ATTR_ROCK;
312 else if (!strcasecmp(&entry->d_name[len-4], ".ucl")) 312 else if (!strcasecmp(&entry->d_name[len-4], ".ucl"))
313 dptr->attr |= TREE_ATTR_UCL; } 313 dptr->attr |= TREE_ATTR_UCL;
314 314#ifdef HAVE_LCD_BITMAP
315 else if (!strcasecmp(&entry->d_name[len-4], ".ch8"))
316 dptr->attr |= TREE_ATTR_CH8;
317#endif
318 }
319
315 /* memorize/compare details about the boot file */ 320 /* memorize/compare details about the boot file */
316 if ((currdir[1] == 0) && !strcmp(entry->d_name, BOOTFILE)) { 321 if ((currdir[1] == 0) && !strcmp(entry->d_name, BOOTFILE)) {
317 if (boot_size) { 322 if (boot_size) {
@@ -1025,6 +1030,11 @@ static bool dirbrowse(char *root, int *dirfilter)
1025 break; 1030 break;
1026 1031
1027#ifdef HAVE_LCD_BITMAP 1032#ifdef HAVE_LCD_BITMAP
1033 /* chip-8 game */
1034 case TREE_ATTR_CH8:
1035 plugin_load("/.rockbox/rocks/chip8.rock",buf);
1036 break;
1037
1028 case TREE_ATTR_FONT: 1038 case TREE_ATTR_FONT:
1029 font_load(buf); 1039 font_load(buf);
1030 set_file(buf, global_settings.font_file, 1040 set_file(buf, global_settings.font_file,
diff --git a/apps/tree.h b/apps/tree.h
index dea0496508..3086c8914b 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -37,6 +37,7 @@ struct entry {
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_UCL 0x4000 /* rockbox flash image */
40#define TREE_ATTR_CH8 0x8000 /* chip-8 game */
40#define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */ 41#define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */
41 42
42void tree_init(void); 43void tree_init(void);