From: notaz Date: Thu, 7 Nov 2024 00:23:41 +0000 (+0200) Subject: cdrom: fix wrong logic with cdr.Prev X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb2e957dc4a99cd15103d54ecac40f5a1d95042b;p=pcsx_rearmed.git cdrom: fix wrong logic with cdr.Prev --- diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 5fcc54cd..a8eb6d9b 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -476,7 +476,7 @@ static int ReadTrack(const u8 *time) return 1; ret = cdra_readTrack(time); - if (ret != 0) + if (ret == 0) memcpy(cdr.Prev, time, 3); return ret == 0; } @@ -1793,8 +1793,9 @@ int cdrFreeze(void *f, int Mode) { tmpp[1] = btoi(tmpp[1]); tmpp[2] = btoi(tmpp[2]); } - cdr.Prev[0]++; - ReadTrack(tmpp); + cdr.Prev[0] = 0xff; + if (tmpp[0] != 0xff) + ReadTrack(tmpp); if (cdr.Play) { if (cdr.freeze_ver < 0x63647202)