static const char *rom_exts[] = {
"zip",
- "bin", "smd", "gen",
+ "bin", "smd", "gen", "md",
"iso", "cso", "cue",
"32x",
"sms",
// rrrr rggg gggb bbbb
static unsigned short fname2color(const char *fname)
{
- const char *ext = fname + strlen(fname) - 3;
static const char *other_exts[] = { "gmv", "pat" };
+ const char *ext;
int i;
- if (ext < fname) ext = fname;
+ ext = strrchr(fname, '.');
+ if (ext++ == NULL) {
+ ext = fname + strlen(fname) - 3;
+ if (ext < fname) ext = fname;
+ }
+
for (i = 0; rom_exts[i] != NULL; i++)
if (strcasecmp(ext, rom_exts[i]) == 0) return 0xbdff; // FIXME: mk defines
for (i = 0; i < array_size(other_exts); i++)
memset(info, 0, sizeof(*info));
info->library_name = "PicoDrive";
info->library_version = VERSION;
- info->valid_extensions = "bin|gen|smd|32x|cue|iso|sms";
+ info->valid_extensions = "bin|gen|smd|md|32x|cue|iso|sms";
info->need_fullpath = true;
}