Backport patches -

- Attempt to skip cheevos when path is of media type
- Don't do CRC32 encoding for media types
This commit is contained in:
twinaphex 2017-05-29 20:26:10 +02:00
parent b4e16c243c
commit dfae380f33
1 changed files with 27 additions and 16 deletions

View File

@ -328,6 +328,11 @@ static bool load_content_into_memory(
return false; return false;
if (i == 0) if (i == 0)
{
enum rarch_content_type type = path_is_media_type(path);
/* If we have a media type, ignore CRC32 calculation. */
if (type == RARCH_CONTENT_NONE)
{ {
/* First content file is significant, attempt to do patching, /* First content file is significant, attempt to do patching,
* CRC checking, etc. */ * CRC checking, etc. */
@ -348,6 +353,9 @@ static bool load_content_into_memory(
RARCH_LOG("CRC32: 0x%x .\n", (unsigned)content_rom_crc); RARCH_LOG("CRC32: 0x%x .\n", (unsigned)content_rom_crc);
} }
else
content_rom_crc = 0;
}
*buf = ret_buf; *buf = ret_buf;
@ -582,9 +590,12 @@ static bool content_file_load(
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (!special) if (!special)
{ {
const char *content_path = content->elems[0].data;
enum rarch_content_type type = path_is_media_type(content_path);
cheevos_set_cheats(); cheevos_set_cheats();
if (!string_is_empty(content->elems[0].data)) if (type == RARCH_CONTENT_NONE && !string_is_empty(content_path))
cheevos_load(info); cheevos_load(info);
} }
#endif #endif