X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;h=fc1d0773ed9bdb23a4257a34063961a646d7bf7c;hb=9fb3178968e3cf83b9c0835aa4b39805b2ba6cf8;hp=d8799dbed12623d4c5baa714bb2378844a53d149;hpb=bde5ee93147e22965118455b8397d4b28ed7743d;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index d8799dbe..fc1d0773 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -43,6 +43,13 @@ #include #endif +#ifdef USE_LIBRETRO_VFS +#include +#undef fseeko +#undef ftello +#define ftello rftell +#define fseeko rfseek +#endif #define OFF_T_MSB ((off_t)1 << (sizeof(off_t) * 8 - 1)) unsigned int cdrIsoMultidiskCount; @@ -1057,7 +1064,10 @@ static int handlechd(const char *isofile) { goto fail_io; if(chd_open(isofile, CHD_OPEN_READ, NULL, &chd_img->chd) != CHDERR_NONE) - goto fail_io; + goto fail_io; + + if (Config.CHD_Precache && (chd_precache(chd_img->chd) != CHDERR_NONE)) + goto fail_io; chd_img->header = chd_get_header(chd_img->chd);