summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/cdrom.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index 8ab80e12..31446ef4 100644
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -156,8 +156,8 @@ void AddIrqQueue(unsigned char irq, unsigned long ecycle) {
} else {
CDR_INT(ecycle);
}
-}
-
+}
+
void cdrInterrupt() {
int i;
unsigned char Irq = cdr.Irq;
@@ -190,14 +190,19 @@ void cdrInterrupt() {
cdr.Result[0] |= 0x11;
cdr.Result[0] &= ~0x02;
}
- else if (i & 0x10) {
+ else if (i & 0x10) {
+ extern void *hCDRDriver;
cdr.StatP |= 0x2;
- cdr.Result[0] |= 0x2;
+ cdr.Result[0] |= 0x2;
+ if (hCDRDriver != NULL) {
+ CDR_close();
+ CDR_open();
+ }
CheckCdrom();
}
}
break;
-
+
case CdlSetloc:
cdr.CmdProcess = 0;
SetResultSize(1);