summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-09 02:22:57 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-08-09 02:22:57 +0000
commitd4840a37d9adf0b9124fad722a5ae5faae4bb639 (patch)
treeadb29427193a551e14fc6bd3d8aacfecf8706746 /macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
parent511edc3388bb3b8285af8c818af27235773d4bce (diff)
dfcdrom: fixed thread deadlock in some cases.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@55905 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFCdrom/macsrc/cdr-macosx.c')
-rw-r--r--macosx/plugins/DFCdrom/macsrc/cdr-macosx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c b/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
index 806b659a..c92156f4 100644
--- a/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
+++ b/macosx/plugins/DFCdrom/macsrc/cdr-macosx.c
@@ -182,6 +182,7 @@ long GetTE(unsigned char track, unsigned char *m, unsigned char *s, unsigned cha
long ReadSector(crdata *cr) {
int lba;
dk_cd_read_t r;
+ char buf[CD_FRAMESIZE_RAW];
if (cdHandle < 0) return -1;
@@ -193,12 +194,13 @@ long ReadSector(crdata *cr) {
r.sectorArea = 0xF8;
r.sectorType = kCDSectorTypeUnknown;
r.bufferLength = CD_FRAMESIZE_RAW;
- r.buffer = cr->buf;
+ r.buffer = buf; // ??? Why using cr->buf directly does not work in threaded mode?
if (ioctl(cdHandle, DKIOCCDREAD, &r) != kIOReturnSuccess) {
return -1;
}
+ memcpy(cr->buf, buf, CD_FRAMESIZE_RAW);
return 0;
}