aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/cdriso.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/cdriso.c')
-rw-r--r--libpcsxcore/cdriso.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c
index d8799db..9e70ddf 100644
--- a/libpcsxcore/cdriso.c
+++ b/libpcsxcore/cdriso.c
@@ -1057,7 +1057,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);