From: notaz Date: Sat, 5 Nov 2022 20:51:37 +0000 (+0200) Subject: cdrom: don't report read too early X-Git-Tag: r24~283 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e6d030e6da39c49b51cbdb2e9cf3feb0a2b9a56;p=pcsx_rearmed.git cdrom: don't report read too early libretro/pcsx_rearmed#706 --- diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 145ca32e..0f1479e2 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1284,8 +1284,6 @@ static void cdrReadInterrupt(void) u8 subqPos[3]; int read_ok; - SetPlaySeekRead(cdr.StatP, STATUS_READ | STATUS_ROTATING); - memcpy(subqPos, cdr.SetSectorPlay, sizeof(subqPos)); msfiAdd(subqPos, cdr.SubqForwardSectors); UpdateSubq(subqPos); @@ -1295,6 +1293,9 @@ static void cdrReadInterrupt(void) return; } + // note: CdlGetlocL should work as soon as STATUS_READ is indicated + SetPlaySeekRead(cdr.StatP, STATUS_READ | STATUS_ROTATING); + read_ok = ReadTrack(cdr.SetSectorPlay); if (read_ok) buf = CDR_getBuffer();