From fb2e957dc4a99cd15103d54ecac40f5a1d95042b Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 7 Nov 2024 02:23:41 +0200 Subject: [PATCH] cdrom: fix wrong logic with cdr.Prev --- libpcsxcore/cdrom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) -- 2.39.5