mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
Merge pull request #10838 from Jamiras/cheevos_hash_more_exts
(cheevos) support for less common file extensions
This commit is contained in:
commit
2c94d9a573
29
deps/rcheevos/src/rhash/hash.c
vendored
29
deps/rcheevos/src/rhash/hash.c
vendored
@ -1390,6 +1390,15 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||||||
const char* ext = rc_path_get_extension(path);
|
const char* ext = rc_path_get_extension(path);
|
||||||
switch (tolower(*ext))
|
switch (tolower(*ext))
|
||||||
{
|
{
|
||||||
|
case '7':
|
||||||
|
if (rc_path_compare_extension(ext, "7z"))
|
||||||
|
{
|
||||||
|
/* decompressing zip file not supported */
|
||||||
|
iterator->consoles[0] = RC_CONSOLE_ARCADE;
|
||||||
|
need_path = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 'a':
|
case 'a':
|
||||||
if (rc_path_compare_extension(ext, "a78"))
|
if (rc_path_compare_extension(ext, "a78"))
|
||||||
{
|
{
|
||||||
@ -1414,12 +1423,14 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||||||
|
|
||||||
if (size > 32 * 1024 * 1024)
|
if (size > 32 * 1024 * 1024)
|
||||||
{
|
{
|
||||||
/* 3DO and Sega CD are the only cores that supports directly opening the bin file. */
|
iterator->consoles[0] = RC_CONSOLE_3DO; /* 4DO supports directly opening the bin file */
|
||||||
iterator->consoles[0] = RC_CONSOLE_3DO;
|
iterator->consoles[1] = RC_CONSOLE_PLAYSTATION; /* PCSX ReARMed supports directly opening the bin file*/
|
||||||
iterator->consoles[1] = RC_CONSOLE_SEGA_CD;
|
|
||||||
|
|
||||||
/* fallback to megadrive - see comment below */
|
/* SEGA CD hash doesn't have any logic to ensure it's being used against a SEGA CD, so it should always be last */
|
||||||
iterator->consoles[2] = RC_CONSOLE_MEGA_DRIVE;
|
iterator->consoles[2] = RC_CONSOLE_SEGA_CD; /* Genesis Plus GX supports directly opening the bin file*/
|
||||||
|
|
||||||
|
/* fallback to megadrive - will only be checked if SEGA CD hash does not match */
|
||||||
|
iterator->consoles[3] = RC_CONSOLE_MEGA_DRIVE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1429,6 +1440,10 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||||||
* hashing algorithm, only specify one of them */
|
* hashing algorithm, only specify one of them */
|
||||||
iterator->consoles[0] = RC_CONSOLE_MEGA_DRIVE;
|
iterator->consoles[0] = RC_CONSOLE_MEGA_DRIVE;
|
||||||
}
|
}
|
||||||
|
else if (rc_path_compare_extension(ext, "bs"))
|
||||||
|
{
|
||||||
|
iterator->consoles[0] = RC_CONSOLE_SUPER_NINTENDO;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
@ -1581,7 +1596,9 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char*
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
if (rc_path_compare_extension(ext, "smc") || rc_path_compare_extension(ext, "sfc"))
|
if (rc_path_compare_extension(ext, "smc") ||
|
||||||
|
rc_path_compare_extension(ext, "sfc") ||
|
||||||
|
rc_path_compare_extension(ext, "swc"))
|
||||||
{
|
{
|
||||||
iterator->consoles[0] = RC_CONSOLE_SUPER_NINTENDO;
|
iterator->consoles[0] = RC_CONSOLE_SUPER_NINTENDO;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user