mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
core, make system detection by extension case insensitive
This commit is contained in:
parent
ac89144969
commit
c7e1c39b28
3 changed files with 7 additions and 7 deletions
|
@ -51,7 +51,7 @@ static int detect_media(const char *fname, const unsigned char *rom, unsigned in
|
|||
}
|
||||
|
||||
// detect wrong extensions
|
||||
if (!strcmp(ext, "srm") || !strcmp(ext, "gz")) // s.gz ~ .mds.gz
|
||||
if (!strcasecmp(ext, "srm") || !strcasecmp(ext, "gz")) // s.gz ~ .mds.gz
|
||||
return PM_BAD_DETECT;
|
||||
|
||||
/* don't believe in extensions, except .cue and .chd */
|
||||
|
@ -356,13 +356,13 @@ enum media_type_e PicoLoadMedia(const char *filename,
|
|||
ext = NULL;
|
||||
}
|
||||
}
|
||||
if (ext && !strcmp(ext,"gg") && !PicoIn.hwSelect) {
|
||||
if (ext && !strcasecmp(ext,"gg") && !PicoIn.hwSelect) {
|
||||
PicoIn.AHW |= PAHW_GG;
|
||||
lprintf("detected GG ROM\n");
|
||||
} else if (ext && !strcmp(ext,"sg")) {
|
||||
} else if (ext && !strcasecmp(ext,"sg")) {
|
||||
PicoIn.AHW |= PAHW_SG;
|
||||
lprintf("detected SG-1000 ROM\n");
|
||||
} else if (ext && !strcmp(ext,"sc")) {
|
||||
} else if (ext && !strcasecmp(ext,"sc")) {
|
||||
PicoIn.AHW |= PAHW_SC;
|
||||
lprintf("detected SC-3000 ROM\n");
|
||||
} else
|
||||
|
|
|
@ -61,7 +61,7 @@ static void *open_save_file(const char *fname, int is_save)
|
|||
int len = strlen(fname);
|
||||
void *afile = NULL;
|
||||
|
||||
if (len > 3 && strcmp(fname + len - 3, ".gz") == 0)
|
||||
if (len > 3 && strcasecmp(fname + len - 3, ".gz") == 0)
|
||||
{
|
||||
if ( (afile = gzopen(fname, is_save ? "wb" : "rb")) ) {
|
||||
set_cbs(1);
|
||||
|
|
|
@ -399,7 +399,7 @@ int emu_reload_rom(const char *rom_fname_in)
|
|||
movie_data = 0;
|
||||
}
|
||||
|
||||
if (!strcmp(ext, ".gmv"))
|
||||
if (!strcasecmp(ext, ".gmv"))
|
||||
{
|
||||
// check for both gmv and rom
|
||||
int dummy;
|
||||
|
@ -436,7 +436,7 @@ int emu_reload_rom(const char *rom_fname_in)
|
|||
get_ext(rom_fname, ext);
|
||||
lprintf("gmv loaded for %s\n", rom_fname);
|
||||
}
|
||||
else if (!strcmp(ext, ".pat"))
|
||||
else if (!strcasecmp(ext, ".pat"))
|
||||
{
|
||||
int dummy;
|
||||
PicoPatchLoad(rom_fname);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue