From 7e6d030e6da39c49b51cbdb2e9cf3feb0a2b9a56 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 5 Nov 2022 22:51:37 +0200 Subject: [PATCH] cdrom: don't report read too early libretro/pcsx_rearmed#706 --- libpcsxcore/cdrom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); -- 2.39.5