Cheat files: If no disc is inserted, treat CRC as 00000000 when trying to load pnach files (previously, empty CRC would result in *.pnach wildcard, which tried to load all pnach files).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5614 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
avihal@gmail.com 2013-04-12 00:23:05 +00:00
parent 2fbcafc85e
commit f0c76c3244
2 changed files with 7 additions and 2 deletions

View File

@ -200,8 +200,13 @@ static int LoadCheatsFiles(const wxString& folderName, wxString& fileSpec, const
// This routine loads cheats from *.pnach files
// Returns number of cheats loaded
// Note: Should be called after InitPatches()
int LoadCheats(const wxString& name, const wxString& folderName, const wxString& friendlyName)
int LoadCheats(wxString name, const wxString& folderName, const wxString& friendlyName)
{
if (!name.Length()) {
Console.WriteLn(Color_Gray, "Cheats: No CRC, using 00000000 instead.");
name = L"00000000";
}
int loaded = 0;
wxString filespec = name + L"*.pnach";

View File

@ -58,7 +58,7 @@ namespace PatchFunc
}
extern void ResetCheatsCount();
extern int LoadCheats(const wxString& name, const wxString& folderName, const wxString& friendlyName);
extern int LoadCheats(wxString name, const wxString& folderName, const wxString& friendlyName);
extern void inifile_command(bool isCheat, const wxString& cmd);
extern void inifile_trim(wxString& buffer);