diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-02-15 03:58:32 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-02-15 03:58:32 +0000 |
| commit | 09deb6a2c3adf334af3e1888c5c2c4b5326cb87d (patch) | |
| tree | c93a197bee484901b4ceb213774075d5e78d1555 | |
| parent | a551b94c78c9f43161bd165d27a479bb4fa0189a (diff) | |
| download | pcsxr-09deb6a2c3adf334af3e1888c5c2c4b5326cb87d.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@41555 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | plugins/dfcdrom/cdr-linux.c | 12 |
2 files changed, 11 insertions, 2 deletions
@@ -2,6 +2,7 @@ February 15, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> * libpcsxcore/psxhw.c: Don't skip calls to psxDman() when TR flag of CHCR is true, which fixes the menu problem in Dragon Quest 7. + * plugins/dfcdrom/cdr-linux.c: Fixed subchannel reading in threaded mode. February 14, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> diff --git a/plugins/dfcdrom/cdr-linux.c b/plugins/dfcdrom/cdr-linux.c index ddf81767..68443ee9 100644 --- a/plugins/dfcdrom/cdr-linux.c +++ b/plugins/dfcdrom/cdr-linux.c @@ -522,19 +522,27 @@ unsigned char *CDRgetBufferSub(void) { int ret; if (!UseSubQ) return NULL; - if (subqread) return (unsigned char *)&subq; cr.msf.cdmsf_min0 = btoi(lastTime[0]); cr.msf.cdmsf_sec0 = btoi(lastTime[1]); cr.msf.cdmsf_frame0 = btoi(lastTime[2]); + + if (ReadMode == THREADED) pthread_mutex_lock(&mut); + if (ioctl(cdHandle, CDROMSEEK, &cr.msf) == -1) { // will be slower, but there's no other way to make it accurate - if (ioctl(cdHandle, CDROMREADRAW, &cr) == -1) return NULL; + if (ioctl(cdHandle, CDROMREADRAW, &cr) == -1) { + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + return NULL; + } } subchnl.cdsc_format = CDROM_MSF; ret = ioctl(cdHandle, CDROMSUBCHNL, &subchnl); + + if (ReadMode == THREADED) pthread_mutex_unlock(&mut); + if (ret == -1) return NULL; subqread = 1; |
