(libchdr) Backport f08156f947

This commit is contained in:
twinaphex 2020-07-01 19:44:17 +02:00
parent 5ded7872de
commit 6bdc9795e7

View File

@ -907,6 +907,12 @@ chd_error chd_open_file(RFILE *file, int mode, chd_file *parent, chd_file **chd)
void* codec = NULL;
switch (newchd->header.compression[decompnum])
{
case CHD_CODEC_ZLIB:
#ifdef HAVE_ZLIB
codec = &newchd->zlib_codec_data;
#endif
break;
case CHD_CODEC_CD_ZLIB:
#ifdef HAVE_ZLIB
codec = &newchd->cdzl_codec_data;
@ -1067,6 +1073,12 @@ void chd_close(chd_file *chd)
#endif
break;
case CHD_CODEC_ZLIB:
#ifdef HAVE_ZLIB
codec = &chd->zlib_codec_data;
#endif
break;
case CHD_CODEC_CD_ZLIB:
#ifdef HAVE_ZLIB
codec = &chd->cdzl_codec_data;
@ -1724,6 +1736,12 @@ static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *des
#endif
break;
case CHD_CODEC_ZLIB:
#ifdef HAVE_ZLIB
codec = &chd->zlib_codec_data;
#endif
break;
case CHD_CODEC_CD_ZLIB:
#ifdef HAVE_ZLIB
codec = &chd->cdzl_codec_data;