unsigned char buf[32];\r
pm_file *cd_f;\r
int type = 0, region = 4; // 1: Japan, 4: US, 8: Europe\r
+ char ext[5];\r
+\r
+ get_ext(romFileName, ext);\r
\r
cd_f = pm_open(romFileName);\r
if (!cd_f) return 0; // let the upper level handle this\r
\r
// check for MegaCD image\r
cd_state = emu_cdCheck(&cd_region);\r
- if (cd_state > 0)\r
+ if (cd_state != CIT_NOT_CD)\r
{\r
PicoAHW |= PAHW_MCD;\r
// valid CD image, check for BIOS..\r
Pico.m.frame_count = 0;\r
\r
// insert CD if it was detected\r
- if (cd_state > 0) {\r
- ret = Insert_CD(romFileName, cd_state == 2);\r
+ if (cd_state != CIT_NOT_CD) {\r
+ ret = Insert_CD(romFileName, cd_state);\r
if (ret != 0) {\r
sprintf(menuErrorMsg, "Insert_CD() failed, invalid CD image?");\r
lprintf("%s\n", menuErrorMsg);\r
static unsigned short file2color(const char *fname)\r
{\r
const char *ext = fname + strlen(fname) - 3;\r
- static const char *rom_exts[] = { "zip", "bin", "smd", "gen", "iso", "cso" };\r
+ static const char *rom_exts[] = { "zip", "bin", "smd", "gen", "iso", "cso", "cue" };\r
static const char *other_exts[] = { "gmv", "pat" };\r
int i;\r
\r
\r
static char *filter_exts[] = {\r
".mp3", ".MP3", ".srm", ".brm", "s.gz", ".mds", "bcfg", ".txt", ".htm", "html",\r
- ".jpg", ".gpe", ".cue"\r
+ ".jpg", ".gpe"\r
};\r
\r
static int scandir_filter(const struct dirent *ent)\r
case 0: // select image\r
selfname = romsel_loop(curr_path);\r
if (selfname) {\r
- int ret = -1, cd_type;\r
+ int ret = -1;\r
+ cd_img_type cd_type;\r
cd_type = emu_cdCheck(NULL);\r
- if (cd_type > 0)\r
- ret = Insert_CD(romFileName, cd_type == 2);\r
+ if (cd_type != CIT_NOT_CD)\r
+ ret = Insert_CD(romFileName, cd_type);\r
if (ret != 0) {\r
sprintf(menuErrorMsg, "Load failed, invalid CD image?");\r
printf("%s\n", menuErrorMsg);\r
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" };
+ static const char *rom_exts[] = { "zip", "bin", "smd", "gen", "iso", "cso", "cue" };
static const char *other_exts[] = { "gmv", "pat" };
int i;
static char *filter_exts[] = {
".mp3", ".srm", ".brm", "s.gz", ".mds", "bcfg", ".txt", ".htm", "html",
- ".jpg", ".cue", ".pbp"
+ ".jpg", ".pbp"
};
static int scandir_filter(const struct my_dirent *ent)
case 0: // select image
selfname = romsel_loop(curr_path);
if (selfname) {
- int ret = -1, cd_type;
+ int ret = -1;
+ cd_img_type cd_type;
cd_type = emu_cdCheck(NULL);
- if (cd_type > 0)
- ret = Insert_CD(romFileName, cd_type == 2);
+ if (cd_type != CIT_NOT_CD)
+ ret = Insert_CD(romFileName, cd_type);
if (ret != 0) {
sprintf(menuErrorMsg, "Load failed, invalid CD image?");
lprintf("%s\n", menuErrorMsg);