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:
parent
b4e16c243c
commit
dfae380f33
|
@ -329,24 +329,32 @@ static bool load_content_into_memory(
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
/* First content file is significant, attempt to do patching,
|
enum rarch_content_type type = path_is_media_type(path);
|
||||||
* CRC checking, etc. */
|
|
||||||
|
|
||||||
/* Attempt to apply a patch. */
|
/* If we have a media type, ignore CRC32 calculation. */
|
||||||
if (!content_ctx->patch_is_blocked)
|
if (type == RARCH_CONTENT_NONE)
|
||||||
patch_content(
|
{
|
||||||
content_ctx->is_ips_pref,
|
/* First content file is significant, attempt to do patching,
|
||||||
content_ctx->is_bps_pref,
|
* CRC checking, etc. */
|
||||||
content_ctx->is_ups_pref,
|
|
||||||
content_ctx->name_ips,
|
|
||||||
content_ctx->name_bps,
|
|
||||||
content_ctx->name_ups,
|
|
||||||
(uint8_t**)&ret_buf,
|
|
||||||
(void*)length);
|
|
||||||
|
|
||||||
content_rom_crc = encoding_crc32(0, ret_buf, *length);
|
/* Attempt to apply a patch. */
|
||||||
|
if (!content_ctx->patch_is_blocked)
|
||||||
|
patch_content(
|
||||||
|
content_ctx->is_ips_pref,
|
||||||
|
content_ctx->is_bps_pref,
|
||||||
|
content_ctx->is_ups_pref,
|
||||||
|
content_ctx->name_ips,
|
||||||
|
content_ctx->name_bps,
|
||||||
|
content_ctx->name_ups,
|
||||||
|
(uint8_t**)&ret_buf,
|
||||||
|
(void*)length);
|
||||||
|
|
||||||
RARCH_LOG("CRC32: 0x%x .\n", (unsigned)content_rom_crc);
|
content_rom_crc = encoding_crc32(0, ret_buf, *length);
|
||||||
|
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue