From a1fa8613cfcb9ab02b6c8b2905d153a89f5b7291 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Fri, 11 Jan 2008 17:40:25 +0000 Subject: [PATCH] clear cheat list when another ROM is loaded --- src/win32/MainWnd.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index c34ea5a4..98c852f7 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -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);