Cleanup another enum

This commit is contained in:
twinaphex 2016-05-08 04:42:28 +02:00
parent fadf87e022
commit 6bf7112282
2 changed files with 4 additions and 20 deletions

View File

@ -960,11 +960,12 @@ static bool read_content_file(unsigned i, const char *path, void **buf,
stream_info.b = ret_buf; stream_info.b = ret_buf;
stream_info.c = *length; stream_info.c = *length;
content_ctl(CONTENT_CTL_STREAM_CRC_CALCULATE, &stream_info); if (!stream_backend)
stream_backend = file_archive_get_default_file_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 #endif
*buf = ret_buf; *buf = ret_buf;
@ -1740,21 +1741,6 @@ bool content_ctl(enum content_ctl_state state, void *data)
} }
content_ctl(CONTENT_CTL_DEINIT, NULL); content_ctl(CONTENT_CTL_DEINIT, NULL);
return false; return false;
case CONTENT_CTL_STREAM_CRC_CALCULATE:
{
content_stream_t *stream = NULL;
#ifdef HAVE_ZLIB
if (!stream_backend)
stream_backend = file_archive_get_default_file_backend();
#endif
stream = (content_stream_t*)data;
#ifdef HAVE_ZLIB
stream->crc = stream_backend->stream_crc_calculate(
stream->a, stream->b, stream->c);
#endif
}
break;
case CONTENT_CTL_NONE: case CONTENT_CTL_NONE:
default: default:
break; break;

View File

@ -49,8 +49,6 @@ enum content_ctl_state
CONTENT_CTL_DEINIT, CONTENT_CTL_DEINIT,
CONTENT_CTL_GET_CRC, CONTENT_CTL_GET_CRC,
CONTENT_CTL_STREAM_CRC_CALCULATE
}; };
typedef struct ram_type typedef struct ram_type