mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
core, system detection by extension in zip files
This commit is contained in:
parent
d89e9fb04a
commit
bfe516c3a9
1 changed files with 5 additions and 3 deletions
|
@ -138,16 +138,18 @@ static int detect_media(const char *fname, const unsigned char *rom, unsigned in
|
|||
|
||||
extension_check:
|
||||
/* probably some headerless thing. Maybe check the extension after all. */
|
||||
ext_ptr = pmf && *pmf->ext ? pmf->ext : ext;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(md_exts); i++)
|
||||
if (strcasecmp(ext, md_exts[i]) == 0)
|
||||
if (strcasecmp(ext_ptr, md_exts[i]) == 0)
|
||||
goto looks_like_md;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sms_exts); i++)
|
||||
if (strcasecmp(ext, sms_exts[i]) == 0)
|
||||
if (strcasecmp(ext_ptr, sms_exts[i]) == 0)
|
||||
goto looks_like_sms;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(pico_exts); i++)
|
||||
if (strcasecmp(ext, pico_exts[i]) == 0)
|
||||
if (strcasecmp(ext_ptr, pico_exts[i]) == 0)
|
||||
goto looks_like_pico;
|
||||
|
||||
/* If everything else fails, make a guess on the reset vector */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue