diff options
author | negativeExponent | 2020-11-04 21:16:24 +0800 |
---|---|---|
committer | negativeExponent | 2020-11-04 21:38:12 +0800 |
commit | 1d2757f476f5c10229e10fa16107d73b0c801fa5 (patch) | |
tree | 4d9d6e6227faee8b316fe039e9ee6a21b627a537 /libpcsxcore | |
parent | 96b0d7854b486457c3af6180ebf5560c94df9158 (diff) | |
download | pcsx_rearmed-1d2757f476f5c10229e10fa16107d73b0c801fa5.tar.gz pcsx_rearmed-1d2757f476f5c10229e10fa16107d73b0c801fa5.tar.bz2 pcsx_rearmed-1d2757f476f5c10229e10fa16107d73b0c801fa5.zip |
CHD: Support for precache mode CD access method
https://github.com/libretro/pcsx_rearmed/issues/261
Diffstat (limited to 'libpcsxcore')
-rw-r--r-- | libpcsxcore/cdriso.c | 5 | ||||
-rw-r--r-- | libpcsxcore/psxcommon.h | 1 |
2 files changed, 5 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); diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index cb417d4..708d984 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -121,6 +121,7 @@ typedef struct { boolean PsxAuto; boolean Cdda; boolean AsyncCD; + boolean CHD_Precache; /* loads disk image into memory, works with CHD only. */ boolean HLE; boolean SlowBoot; boolean Debug; |