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.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1436 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
skidau 2015-05-18 00:26:21 +00:00
parent 20a298a66e
commit 103b0270d8
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();
}
}