mirror of https://github.com/PCSX2/pcsx2.git
Shit I'm commit-spamming again. >_<
Fixed a "omgf"-class bug, which just happened to work while using ISOs because of a shared variable which wasn't meant to be shared. And more cleanups. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1500 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
bd5eaf9077
commit
6924e9cc44
|
@ -208,6 +208,7 @@ void DetectDiskType()
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
|
int cdvdInitCount=0;
|
||||||
|
|
||||||
s32 DoCDVDinit()
|
s32 DoCDVDinit()
|
||||||
{
|
{
|
||||||
|
@ -215,7 +216,10 @@ s32 DoCDVDinit()
|
||||||
ISOinit();
|
ISOinit();
|
||||||
|
|
||||||
if(!loadFromISO)
|
if(!loadFromISO)
|
||||||
|
{
|
||||||
|
cdvdInitCount++; // used to handle the case where the plugin was inited at boot, but then iso takes over
|
||||||
return CDVDinit();
|
return CDVDinit();
|
||||||
|
}
|
||||||
|
|
||||||
diskTypeCached=-1;
|
diskTypeCached=-1;
|
||||||
|
|
||||||
|
@ -310,8 +314,9 @@ void DoCDVDclose()
|
||||||
|
|
||||||
void DoCDVDshutdown()
|
void DoCDVDshutdown()
|
||||||
{
|
{
|
||||||
if(!loadFromISO)
|
if((!loadFromISO)||(cdvdInitCount>0)) // handle the case where the plugin was inited at boot, but then iso takes over
|
||||||
{
|
{
|
||||||
|
cdvdInitCount--;
|
||||||
if (CDVDshutdown != NULL) CDVDshutdown();
|
if (CDVDshutdown != NULL) CDVDshutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,12 +355,11 @@ s32 DoCDVDreadSector(u8* buffer, u32 lsn, int mode)
|
||||||
else ret = -1;
|
else ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(ret==0)
|
if(ret==0)
|
||||||
{
|
{
|
||||||
if (blockDumpFile != NULL)
|
if (blockDumpFile != NULL)
|
||||||
{
|
{
|
||||||
isoWriteBlock(blockDumpFile, pbuffer, plsn);
|
isoWriteBlock(blockDumpFile, buffer, plsn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -410,7 +414,7 @@ s32 DoCDVDgetBuffer(u8* buffer)
|
||||||
{
|
{
|
||||||
if (blockDumpFile != NULL)
|
if (blockDumpFile != NULL)
|
||||||
{
|
{
|
||||||
isoWriteBlock(blockDumpFile, pbuffer, plsn);
|
isoWriteBlock(blockDumpFile, buffer, plsn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -40,19 +40,11 @@ int cdtype;
|
||||||
|
|
||||||
int psize;
|
int psize;
|
||||||
|
|
||||||
int BlockDump;
|
|
||||||
isoFile *iso;
|
isoFile *iso;
|
||||||
|
|
||||||
FILE *cdvdLog = NULL;
|
FILE *cdvdLog = NULL;
|
||||||
|
|
||||||
char *methods[] =
|
u8 cdbuffer[2352] = {0};
|
||||||
{
|
|
||||||
".Z - compress faster",
|
|
||||||
".BZ - compress better",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
u8 cdbuffer[CD_FRAMESIZE_RAW * 10] = {0};
|
|
||||||
|
|
||||||
s32 msf_to_lba(u8 m, u8 s, u8 f)
|
s32 msf_to_lba(u8 m, u8 s, u8 f)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,16 +43,9 @@ void __Log(char *fmt, ...);
|
||||||
|
|
||||||
extern char isoFileName[256];
|
extern char isoFileName[256];
|
||||||
|
|
||||||
extern int BlockDump;
|
|
||||||
extern isoFile *blockDumpFile;
|
extern isoFile *blockDumpFile;
|
||||||
extern isoFile *iso;
|
extern isoFile *iso;
|
||||||
|
|
||||||
extern u8 cdbuffer[];
|
|
||||||
extern u8 *pbuffer;
|
|
||||||
extern int cdtype;
|
|
||||||
|
|
||||||
extern char *methods[];
|
|
||||||
|
|
||||||
s32 ISOinit();
|
s32 ISOinit();
|
||||||
void ISOshutdown();
|
void ISOshutdown();
|
||||||
s32 ISOopen(const char* pTitle);
|
s32 ISOopen(const char* pTitle);
|
||||||
|
|
Loading…
Reference in New Issue