From 33716956638b56f994b9aadbd70c9c2265acf048 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 31 Jan 2011 01:19:54 +0200 Subject: cdrcimg: support .bz/.znx/eboot formats not making use of extra .znx data or eboot TOCs yet. --- frontend/main.c | 12 +++++------- frontend/menu.c | 6 +++--- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'frontend') diff --git a/frontend/main.c b/frontend/main.c index 37c9ba3..9f24540 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -64,14 +64,12 @@ void set_cd_image(const char *fname) { const char *ext = NULL; - if (fname != NULL) { - int len = strlen(fname); - ext = fname; - if (len > 2) - ext = fname + len - 2; - } + if (fname != NULL) + ext = strrchr(fname, '.'); - if (ext && strcasecmp(ext, ".z") == 0) { + if (ext && ( + strcasecmp(ext, ".z") == 0 || strcasecmp(ext, ".bz") == 0 || + strcasecmp(ext, ".znx") == 0 || strcasecmp(ext, ".pbp") == 0)) { SetIsoFile(NULL); cdrcimg_set_fname(fname); strcpy(Config.Cdr, "builtin_cdrcimg"); diff --git a/frontend/menu.c b/frontend/menu.c index 1de9587..af35119 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -175,7 +175,7 @@ static const struct { CE_CONFIG_STR(Bios), CE_CONFIG_STR(Gpu), CE_CONFIG_STR(Spu), - CE_CONFIG_STR(Cdr), +// CE_CONFIG_STR(Cdr), CE_CONFIG_VAL(Xa), CE_CONFIG_VAL(Sio), CE_CONFIG_VAL(Mdec), @@ -387,8 +387,8 @@ fail: // rrrr rggg gggb bbbb static unsigned short fname2color(const char *fname) { - static const char *cdimg_exts[] = { ".bin", ".img", ".iso", ".z", ".cue" }; - static const char *other_exts[] = { ".ccd", ".toc", ".mds", ".sub", ".table" }; + static const char *cdimg_exts[] = { ".bin", ".img", ".iso", ".cue", ".z", ".bz", ".znx", ".pbp" }; + static const char *other_exts[] = { ".ccd", ".toc", ".mds", ".sub", ".table", ".index" }; const char *ext = strrchr(fname, '.'); int i; -- cgit v1.2.3