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:
gigaherz 2009-07-13 00:24:43 +00:00
parent bd5eaf9077
commit 6924e9cc44
3 changed files with 9 additions and 20 deletions

View File

@ -208,6 +208,7 @@ void DetectDiskType()
//
/////////////////////////////////////////////////
int cdvdInitCount=0;
s32 DoCDVDinit()
{
@ -215,7 +216,10 @@ s32 DoCDVDinit()
ISOinit();
if(!loadFromISO)
{
cdvdInitCount++; // used to handle the case where the plugin was inited at boot, but then iso takes over
return CDVDinit();
}
diskTypeCached=-1;
@ -310,8 +314,9 @@ void DoCDVDclose()
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();
}
@ -350,12 +355,11 @@ s32 DoCDVDreadSector(u8* buffer, u32 lsn, int mode)
else ret = -1;
}
if(ret==0)
{
if (blockDumpFile != NULL)
{
isoWriteBlock(blockDumpFile, pbuffer, plsn);
isoWriteBlock(blockDumpFile, buffer, plsn);
}
}
return ret;
@ -410,7 +414,7 @@ s32 DoCDVDgetBuffer(u8* buffer)
{
if (blockDumpFile != NULL)
{
isoWriteBlock(blockDumpFile, pbuffer, plsn);
isoWriteBlock(blockDumpFile, buffer, plsn);
}
}
return ret;

View File

@ -40,19 +40,11 @@ int cdtype;
int psize;
int BlockDump;
isoFile *iso;
FILE *cdvdLog = NULL;
char *methods[] =
{
".Z - compress faster",
".BZ - compress better",
NULL
};
u8 cdbuffer[CD_FRAMESIZE_RAW * 10] = {0};
u8 cdbuffer[2352] = {0};
s32 msf_to_lba(u8 m, u8 s, u8 f)
{

View File

@ -43,16 +43,9 @@ void __Log(char *fmt, ...);
extern char isoFileName[256];
extern int BlockDump;
extern isoFile *blockDumpFile;
extern isoFile *iso;
extern u8 cdbuffer[];
extern u8 *pbuffer;
extern int cdtype;
extern char *methods[];
s32 ISOinit();
void ISOshutdown();
s32 ISOopen(const char* pTitle);