mirror of https://github.com/PCSX2/pcsx2.git
Bugfix for recent cleanups: SetResultSize was defined with different behaviors in two separate files, without being static. Depending on the whims of the wind, MSVC would sometimes pick the one from CDROM and link it into CDVD, overriding CDVD's version, and resulting in complete emulation failure.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1103 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
bc9e0b08ad
commit
45bb6f3d2f
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
static cdvdStruct cdvd;
|
static cdvdStruct cdvd;
|
||||||
|
|
||||||
__forceinline void SetResultSize(u8 size)
|
static __forceinline void SetResultSize(u8 size)
|
||||||
{
|
{
|
||||||
cdvd.ResultC = size;
|
cdvd.ResultC = size;
|
||||||
cdvd.ResultP = 0;
|
cdvd.ResultP = 0;
|
||||||
|
@ -442,7 +442,7 @@ s32 cdvdGetTrayStatus()
|
||||||
// cdvdNewDiskCB() can update it's status as well...
|
// cdvdNewDiskCB() can update it's status as well...
|
||||||
|
|
||||||
// Modified by (efp) - 16/01/2006
|
// Modified by (efp) - 16/01/2006
|
||||||
__forceinline void cdvdGetDiskType()
|
static __forceinline void cdvdGetDiskType()
|
||||||
{
|
{
|
||||||
// defs 0.9.0
|
// defs 0.9.0
|
||||||
if (CDVDnewDiskCB || (cdvd.Type != CDVD_TYPE_NODISC)) return;
|
if (CDVDnewDiskCB || (cdvd.Type != CDVD_TYPE_NODISC)) return;
|
||||||
|
|
|
@ -112,13 +112,13 @@ static __forceinline void StopCdda() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline void SetResultSize(u8 size) {
|
static __forceinline void SetResultSize(u8 size) {
|
||||||
cdr.ResultP = 0;
|
cdr.ResultP = 0;
|
||||||
cdr.ResultC = size;
|
cdr.ResultC = size;
|
||||||
cdr.ResultReady = 1;
|
cdr.ResultReady = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline s32 MSFtoLSN(u8 *Time) {
|
static __forceinline s32 MSFtoLSN(u8 *Time) {
|
||||||
u32 lsn;
|
u32 lsn;
|
||||||
|
|
||||||
lsn = Time[2];
|
lsn = Time[2];
|
||||||
|
@ -127,7 +127,7 @@ __forceinline s32 MSFtoLSN(u8 *Time) {
|
||||||
return lsn;
|
return lsn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LSNtoMSF(u8 *Time, s32 lsn) {
|
static __forceinline void LSNtoMSF(u8 *Time, s32 lsn) {
|
||||||
lsn += 150;
|
lsn += 150;
|
||||||
Time[2] = lsn / 4500; // minuten
|
Time[2] = lsn / 4500; // minuten
|
||||||
lsn = lsn - Time[2] * 4500; // minuten rest
|
lsn = lsn - Time[2] * 4500; // minuten rest
|
||||||
|
@ -135,7 +135,7 @@ void LSNtoMSF(u8 *Time, s32 lsn) {
|
||||||
Time[0] = lsn - Time[1] * 75; // sekunden rest
|
Time[0] = lsn - Time[1] * 75; // sekunden rest
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadTrack() {
|
static void ReadTrack() {
|
||||||
cdr.Prev[0] = itob(cdr.SetSector[0]);
|
cdr.Prev[0] = itob(cdr.SetSector[0]);
|
||||||
cdr.Prev[1] = itob(cdr.SetSector[1]);
|
cdr.Prev[1] = itob(cdr.SetSector[1]);
|
||||||
cdr.Prev[2] = itob(cdr.SetSector[2]);
|
cdr.Prev[2] = itob(cdr.SetSector[2]);
|
||||||
|
@ -152,7 +152,7 @@ void ReadTrack() {
|
||||||
#define DataEnd 4
|
#define DataEnd 4
|
||||||
#define DiskError 5
|
#define DiskError 5
|
||||||
|
|
||||||
void AddIrqQueue(u8 irq, unsigned long ecycle) {
|
static void AddIrqQueue(u8 irq, unsigned long ecycle) {
|
||||||
cdr.Irq = irq;
|
cdr.Irq = irq;
|
||||||
if (cdr.Stat) {
|
if (cdr.Stat) {
|
||||||
cdr.eCycle = ecycle;
|
cdr.eCycle = ecycle;
|
||||||
|
|
Loading…
Reference in New Issue