mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 00:39:40 +00:00
Merge pull request #915 from sonninnos/less-strict-ext
Some checks failed
Crowdin Translation Integration / create_intl_file (push) Has been cancelled
Some checks failed
Crowdin Translation Integration / create_intl_file (push) Has been cancelled
Use less strict extension matching
This commit is contained in:
commit
46a8887f91
14
libretro.cpp
14
libretro.cpp
@ -4254,13 +4254,13 @@ static bool MDFNI_LoadGame(const char *name)
|
||||
RFILE *GameFile = NULL;
|
||||
size_t name_len = strlen(name);
|
||||
|
||||
if(name_len > 4 && (
|
||||
!strcasecmp(name + name_len - 4, ".cue") ||
|
||||
!strcasecmp(name + name_len - 4, ".ccd") ||
|
||||
!strcasecmp(name + name_len - 4, ".toc") ||
|
||||
!strcasecmp(name + name_len - 4, ".m3u") ||
|
||||
!strcasecmp(name + name_len - 4, ".chd") ||
|
||||
!strcasecmp(name + name_len - 4, ".pbp")
|
||||
if(name_len > 3 && (
|
||||
!strcasecmp(name + name_len - 3, "cue") ||
|
||||
!strcasecmp(name + name_len - 3, "ccd") ||
|
||||
!strcasecmp(name + name_len - 3, "toc") ||
|
||||
!strcasecmp(name + name_len - 3, "m3u") ||
|
||||
!strcasecmp(name + name_len - 3, "chd") ||
|
||||
!strcasecmp(name + name_len - 3, "pbp")
|
||||
))
|
||||
return MDFNI_LoadCD(name);
|
||||
|
||||
|
@ -48,14 +48,14 @@ CDAccess::~CDAccess()
|
||||
CDAccess *cdaccess_open_image(bool *success, const char *path, bool image_memcache)
|
||||
{
|
||||
size_t path_len = strlen(path);
|
||||
if (path_len >= 4 && !strcasecmp(path + path_len - 4, ".ccd"))
|
||||
if (path_len >= 3 && !strcasecmp(path + path_len - 3, "ccd"))
|
||||
return new CDAccess_CCD(success, path, image_memcache);
|
||||
#ifdef HAVE_PBP
|
||||
else if (path_len >= 4 && !strcasecmp(path + path_len - 4, ".pbp"))
|
||||
else if (path_len >= 3 && !strcasecmp(path + path_len - 3, "pbp"))
|
||||
return new CDAccess_PBP(path, image_memcache);
|
||||
#endif
|
||||
#ifdef HAVE_CHD
|
||||
else if (path_len >= 4 && !strcasecmp(path + path_len - 4, ".chd"))
|
||||
else if (path_len >= 3 && !strcasecmp(path + path_len - 3, "chd"))
|
||||
return new CDAccess_CHD(path, image_memcache);
|
||||
#endif
|
||||
return new CDAccess_Image(success, path, image_memcache);
|
||||
|
Loading…
Reference in New Issue
Block a user