summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-09-20 15:23:55 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-09-20 15:23:55 +0000
commitc22fec7e40b7519db5bda08f3992dbc4f08453ae (patch)
tree73848563fda68f3d95a54c5c1c002183af6bcceb
parent1cee0e9b3ec6781f21b1b44cb072b3f56a1436aa (diff)
downloadpcsxr-c22fec7e40b7519db5bda08f3992dbc4f08453ae.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@30155 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--ChangeLog1
-rw-r--r--libpcsxcore/cdrom.c15
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2660b35e..84e0d5e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ September 20, 2009 Wei Mingzhi <weimingzhi@gmail.com>
malloc() and free().
* libpcsxcore/ix86/iR3000A.c: Minor cleanup.
* po/zh_TW.po: Updated.
+ * libpcsxcore/cdrom.c: Close & reopen the CDR plugin after switching discs.
September 18, 2009 Wei Mingzhi <weimingzhi@gmail.com>
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);