clear cheat list when another ROM is loaded

This commit is contained in:
spacy51 2008-01-11 17:40:25 +00:00
parent 99acf7c6ba
commit a1fa8613cf
1 changed files with 7 additions and 0 deletions

View File

@ -482,6 +482,7 @@ bool MainWnd::FileRun()
}
char tempName[2048];
char file[2048];
CString oldFile = theApp.filename;
utilStripDoubleExtension(theApp.szFile, tempName);
@ -492,6 +493,12 @@ bool MainWnd::FileRun()
if(index != -1)
theApp.filename = theApp.filename.Left(index);
if( theApp.filename != oldFile ) {
// clear cheat list when another game is loaded
cheatsDeleteAll( false );
gbCheatRemoveAll();
}
CString ipsname;
ipsname.Format("%s.ips", theApp.filename);