From: notaz Date: Sat, 12 Nov 2022 15:57:31 +0000 (+0200) Subject: cdriso: unbreak cdda for chd X-Git-Tag: r24~282 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbd88286c7e8473e1062fbe740ec59a302031531;p=pcsx_rearmed.git cdriso: unbreak cdda for chd notaz/pcsx_rearmed#272 --- diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 31895794..f47fcfdd 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -110,7 +110,7 @@ struct trackinfo { char start[3]; // MSF-format char length[3]; // MSF-format FILE *handle; // for multi-track images CDDA - unsigned int start_offset; // byte offset from start of above file + unsigned int start_offset; // byte offset from start of above file (chd: sector offset) }; #define MAXTRACKS 100 /* How many tracks can a CD hold? */ @@ -1229,7 +1229,7 @@ static int cdread_chd(FILE *f, unsigned int base, void *dest, int sector) { int hunk; - assert(base == 0); + sector += base; hunk = sector / chd_img->sectors_per_hunk; chd_img->sector_in_hunk = sector % chd_img->sectors_per_hunk;