diff options
author | notaz | 2010-12-14 01:54:58 +0200 |
---|---|---|
committer | notaz | 2010-12-16 18:37:55 +0200 |
commit | 9564e73db83552dd7992c633362b0d99e14a4453 (patch) | |
tree | dd5175128d32c1774cb498476f6ebc0f3ebf8bc6 /frontend/common | |
parent | 47bf65ab6163fb70eb2ad309c9487229832bcaed (diff) | |
download | pcsx_rearmed-9564e73db83552dd7992c633362b0d99e14a4453.tar.gz pcsx_rearmed-9564e73db83552dd7992c633362b0d99e14a4453.tar.bz2 pcsx_rearmed-9564e73db83552dd7992c633362b0d99e14a4453.zip |
menu: setup colors for file browser
Diffstat (limited to 'frontend/common')
-rw-r--r-- | frontend/common/menu.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/frontend/common/menu.c b/frontend/common/menu.c index 5f97730..a571ddd 100644 --- a/frontend/common/menu.c +++ b/frontend/common/menu.c @@ -729,22 +729,6 @@ static void do_delete(const char *fpath, const char *fname) // -------------- ROM selector --------------
-// rrrr rggg gggb bbbb
-static unsigned short file2color(const char *fname)
-{
- const char *ext = fname + strlen(fname) - 3;
- static const char *rom_exts[] = { "zip", "bin", "smd", "gen", "iso", "cso", "cue" };
- static const char *other_exts[] = { "gmv", "pat" };
- int i;
-
- if (ext < fname) ext = fname;
- for (i = 0; i < array_size(rom_exts); i++)
- if (strcasecmp(ext, rom_exts[i]) == 0) return 0xbdff; // FIXME: mk defines
- for (i = 0; i < array_size(other_exts); i++)
- if (strcasecmp(ext, other_exts[i]) == 0) return 0xaff5;
- return 0xffff;
-}
-
static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel)
{
int max_cnt, start, i, x, pos;
@@ -773,7 +757,7 @@ static void draw_dirlist(char *curdir, struct dirent **namelist, int n, int sel) smalltext_out16(x, pos * me_sfont_h, "/", 0xfff6);
smalltext_out16(x + me_sfont_w, pos * me_sfont_h, namelist[i+1]->d_name, 0xfff6);
} else {
- unsigned short color = file2color(namelist[i+1]->d_name);
+ unsigned short color = fname2color(namelist[i+1]->d_name);
smalltext_out16(x, pos * me_sfont_h, namelist[i+1]->d_name, color);
}
}
|