Fixed auto-patch extension setting. Patch by Mook.

It appears that SetExt() doesn't require a leading period in the extension. This makes auto-loading of ups patches work (at least, for the one I tried).

Updated the comment too, for grepablility.
This commit is contained in:
skidau 2015-05-18 00:26:21 +00:00
parent a5592566c5
commit 8d6f10107c
1 changed files with 3 additions and 3 deletions

View File

@ -115,16 +115,16 @@ void GameArea::LoadGame(const wxString &name)
if (loadpatch)
{
// SetExt may strip something off by accident, so append to text instead
// pfn.SetExt(wxT(".ips")
// pfn.SetExt(wxT("ips")
pfn.SetFullName(pfn.GetFullName() + wxT(".ips"));
if (!pfn.IsFileReadable())
{
pfn.SetExt(wxT(".ups"));
pfn.SetExt(wxT("ups"));
if (!pfn.IsFileReadable())
{
pfn.SetExt(wxT(".ppf"));
pfn.SetExt(wxT("ppf"));
loadpatch = pfn.IsFileReadable();
}
}