mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: support both pnach and PNACH extension (linux is case sensitive...)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5642 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
dfd4e9b216
commit
832016f757
|
@ -184,6 +184,7 @@ static int LoadCheatsFiles(const wxDirName& folderName, wxString& fileSpec, cons
|
||||||
wxTextFile f;
|
wxTextFile f;
|
||||||
bool found = dir.GetFirst(&buffer, fileSpec, wxDIR_FILES);
|
bool found = dir.GetFirst(&buffer, fileSpec, wxDIR_FILES);
|
||||||
while (found) {
|
while (found) {
|
||||||
|
if (buffer.Matches(L"*.pnach") || buffer.Matches(L"*.PNACH")) {
|
||||||
Console.WriteLn(Color_Gray, L"Found %s file: '%s'", friendlyName.c_str(), buffer.c_str());
|
Console.WriteLn(Color_Gray, L"Found %s file: '%s'", friendlyName.c_str(), buffer.c_str());
|
||||||
int before = cheatnumber;
|
int before = cheatnumber;
|
||||||
f.Open(Path::Combine(dir.GetName(), buffer));
|
f.Open(Path::Combine(dir.GetName(), buffer));
|
||||||
|
@ -191,6 +192,7 @@ static int LoadCheatsFiles(const wxDirName& folderName, wxString& fileSpec, cons
|
||||||
f.Close();
|
f.Close();
|
||||||
int loaded = cheatnumber - before;
|
int loaded = cheatnumber - before;
|
||||||
Console.WriteLn((loaded ? Color_Green : Color_Gray), L"Loaded %d %s from '%s'", loaded, friendlyName.c_str(), buffer.c_str());
|
Console.WriteLn((loaded ? Color_Green : Color_Gray), L"Loaded %d %s from '%s'", loaded, friendlyName.c_str(), buffer.c_str());
|
||||||
|
}
|
||||||
found = dir.GetNext(&buffer);
|
found = dir.GetNext(&buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,11 +211,11 @@ int LoadCheats(wxString name, const wxDirName& folderName, const wxString& frien
|
||||||
|
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
|
|
||||||
wxString filespec = name + L"*.pnach";
|
wxString filespec = name + L"*.*";
|
||||||
loaded += LoadCheatsFiles(folderName, filespec, friendlyName);
|
loaded += LoadCheatsFiles(folderName, filespec, friendlyName);
|
||||||
|
|
||||||
if (wxFileName::IsCaseSensitive() && name != name.Upper()) {
|
if (wxFileName::IsCaseSensitive() && name != name.Upper()) {
|
||||||
filespec = name.Upper() + L"*.pnach";
|
filespec = name.Upper() + L"*.*";
|
||||||
loaded += LoadCheatsFiles(folderName, filespec, friendlyName);
|
loaded += LoadCheatsFiles(folderName, filespec, friendlyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue