Bug fix for saving of CDL and debug files when the ROM was loaded from an archive.
This commit is contained in:
parent
0ce058b35b
commit
b0c460fd1d
|
@ -623,7 +623,14 @@ static int getDefaultCDLFile( char *filepath )
|
|||
|
||||
parseFilepath( romFile, dir, baseFile );
|
||||
|
||||
if ( dir[0] == 0 )
|
||||
{
|
||||
sprintf( filepath, "%s.cdl", baseFile );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( filepath, "%s/%s.cdl", dir, baseFile );
|
||||
}
|
||||
|
||||
//printf("%s\n", filepath );
|
||||
|
||||
|
@ -827,7 +834,7 @@ void SaveCDLogFile(void)
|
|||
FP = fopen(loadedcdfile, "wb");
|
||||
if (FP == NULL)
|
||||
{
|
||||
FCEUD_PrintError("Error Saving File");
|
||||
FCEUD_PrintError("Error Saving CDL File");
|
||||
return;
|
||||
}
|
||||
fwrite(cdloggerdata, cdloggerdataSize, 1, FP);
|
||||
|
|
|
@ -2443,7 +2443,7 @@ void saveGameDebugBreakpoints(void)
|
|||
debuggerBookmark_t *bm;
|
||||
|
||||
// If no breakpoints are loaded, skip saving
|
||||
if ( numWPs == 0 )
|
||||
if ( (numWPs == 0) && (dbgBmMgr.size() == 0) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -39,9 +39,19 @@ int getDirFromFile( const char *path, char *dir )
|
|||
const char *getRomFile( void )
|
||||
{
|
||||
if ( GameInfo )
|
||||
{
|
||||
//printf("filename: '%s' \n", GameInfo->filename );
|
||||
//printf("archiveFilename: '%s' \n", GameInfo->archiveFilename );
|
||||
|
||||
if ( GameInfo->archiveFilename != NULL )
|
||||
{
|
||||
return GameInfo->archiveFilename;
|
||||
}
|
||||
else
|
||||
{
|
||||
return GameInfo->filename;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue