mirror of https://github.com/PCSX2/pcsx2.git
Fixed a "whoops" bug on CDVD closing. Removed some unused code from CDVDisoReader.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1499 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
0d879dec90
commit
bd5eaf9077
|
@ -124,7 +124,11 @@ int FindDiskType(int mType)
|
|||
{
|
||||
cdvdTD td,td2;
|
||||
DoCDVDgetTD(i,&td);
|
||||
|
||||
if(tn.etrack>i)
|
||||
DoCDVDgetTD(i+1,&td2);
|
||||
else
|
||||
DoCDVDgetTD(0,&td2);
|
||||
|
||||
int tlength = td2.lsn - td.lsn;
|
||||
|
||||
|
@ -207,6 +211,9 @@ void DetectDiskType()
|
|||
|
||||
s32 DoCDVDinit()
|
||||
{
|
||||
// called even when not used
|
||||
ISOinit();
|
||||
|
||||
if(!loadFromISO)
|
||||
return CDVDinit();
|
||||
|
||||
|
@ -307,6 +314,8 @@ void DoCDVDshutdown()
|
|||
{
|
||||
if (CDVDshutdown != NULL) CDVDshutdown();
|
||||
}
|
||||
|
||||
ISOshutdown();
|
||||
}
|
||||
|
||||
s32 DoCDVDreadSector(u8* buffer, u32 lsn, int mode)
|
||||
|
|
|
@ -34,32 +34,17 @@
|
|||
bool loadFromISO=false;
|
||||
|
||||
char isoFileName[256];
|
||||
char IsoCWD[256];
|
||||
char CdDev[256];
|
||||
|
||||
_cdIso cdIso[8];
|
||||
u8 *pbuffer;
|
||||
int cdblocksize;
|
||||
int cdblockofs;
|
||||
int cdoffset;
|
||||
int cdtype;
|
||||
int cdblocks;
|
||||
|
||||
int psize;
|
||||
|
||||
int Zmode; // 1 Z - 2 bz2
|
||||
int fmode; // 0 - file / 1 - Zfile
|
||||
char *Ztable;
|
||||
|
||||
int BlockDump;
|
||||
isoFile *iso;
|
||||
|
||||
FILE *cdvdLog = NULL;
|
||||
|
||||
// This var is used to detect resume-style behavior of the Pcsx2 emulator,
|
||||
// and skip prompting the user for a new CD when it's likely they want to run the existing one.
|
||||
static char cdvdCurrentIso[MAX_PATH];
|
||||
|
||||
char *methods[] =
|
||||
{
|
||||
".Z - compress faster",
|
||||
|
@ -123,14 +108,11 @@ s32 ISOinit()
|
|||
CDVD_LOG("CDVDinit\n");
|
||||
#endif
|
||||
|
||||
cdvdCurrentIso[0] = 0;
|
||||
memset(cdIso, 0, sizeof(cdIso));
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ISOshutdown()
|
||||
{
|
||||
cdvdCurrentIso[0] = 0;
|
||||
#ifdef CDVD_LOG
|
||||
if (cdvdLog != NULL) fclose(cdvdLog);
|
||||
#endif
|
||||
|
@ -159,8 +141,6 @@ s32 ISOopen(const char* pTitle)
|
|||
|
||||
void ISOclose()
|
||||
{
|
||||
strcpy(cdvdCurrentIso, isoFileName);
|
||||
|
||||
isoClose(iso);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,36 +38,10 @@ extern FILE *cdvdLog;
|
|||
|
||||
void __Log(char *fmt, ...);
|
||||
|
||||
#define VERBOSE 1
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int slsn;
|
||||
int elsn;
|
||||
#ifdef _WIN32
|
||||
HANDLE handle;
|
||||
#else
|
||||
FILE *handle;
|
||||
#endif
|
||||
} _cdIso;
|
||||
|
||||
extern _cdIso cdIso[8];
|
||||
|
||||
#define CD_FRAMESIZE_RAW 2352
|
||||
#define DATA_SIZE (CD_FRAMESIZE_RAW-12)
|
||||
|
||||
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
|
||||
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
|
||||
|
||||
#define MSF2SECT(m,s,f) (((m)*60+(s)-2)*75+(f))
|
||||
|
||||
extern const u8 version;
|
||||
extern const u8 revision;
|
||||
extern const u8 build;
|
||||
|
||||
extern char isoFileName[256];
|
||||
extern char IsoCWD[256];
|
||||
extern char CdDev[256];
|
||||
|
||||
extern int BlockDump;
|
||||
extern isoFile *blockDumpFile;
|
||||
|
@ -75,15 +49,7 @@ extern isoFile *iso;
|
|||
|
||||
extern u8 cdbuffer[];
|
||||
extern u8 *pbuffer;
|
||||
extern int cdblocksize;
|
||||
extern int cdblockofs;
|
||||
extern int cdoffset;
|
||||
extern int cdtype;
|
||||
extern int cdblocks;
|
||||
|
||||
extern int Zmode; // 1 Z - 2 bz2
|
||||
extern int fmode; // 0 - file / 1 - Zfile
|
||||
extern char *Ztable;
|
||||
|
||||
extern char *methods[];
|
||||
|
||||
|
|
|
@ -929,7 +929,13 @@ void ClosePlugins( bool closegs )
|
|||
}
|
||||
}
|
||||
|
||||
CLOSE_PLUGIN( CDVD );
|
||||
//CLOSE_PLUGIN( CDVD );
|
||||
if( OpenStatus.CDVD )
|
||||
{
|
||||
DoCDVDclose();
|
||||
OpenStatus.CDVD = false;
|
||||
}
|
||||
|
||||
CLOSE_PLUGIN( DEV9 );
|
||||
CLOSE_PLUGIN( USB );
|
||||
CLOSE_PLUGIN( FW );
|
||||
|
|
Loading…
Reference in New Issue