From 605011ffe22d965f06c4525f7ab9129156e8b1f0 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 19 Sep 2016 21:18:49 -0400 Subject: [PATCH] use generic crc32 --- tasks/task_content.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tasks/task_content.c b/tasks/task_content.c index d8e124e93f..5270178258 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -339,25 +340,19 @@ static bool read_content_file(unsigned i, const char *path, void **buf, if (!global->patch.block_patch) patch_content(&ret_buf, length); -#ifdef HAVE_COMPRESSION content_get_crc(&content_crc_ptr); stream_info.a = 0; stream_info.b = ret_buf; stream_info.c = *length; - stream_backend = file_archive_get_file_backend(path); + stream_info.crc = encoding_crc32( + stream_info.a, stream_info.b, stream_info.c); - if (stream_backend) - { - stream_info.crc = stream_backend->stream_crc_calculate( - stream_info.a, stream_info.b, stream_info.c); + *content_crc_ptr = stream_info.crc; - *content_crc_ptr = stream_info.crc; + RARCH_LOG("CRC32: 0x%x .\n", (unsigned)*content_crc_ptr); - RARCH_LOG("CRC32: 0x%x .\n", (unsigned)*content_crc_ptr); - } -#endif *buf = ret_buf; return true;