From e26fe5c4c9777a692edb1463ca0956cbcf965a73 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sat, 7 Nov 2009 02:20:00 +0000 Subject: [PATCH] Wee bit 'o cleanup to patch file checking. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2144 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Patch.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/pcsx2/Patch.cpp b/pcsx2/Patch.cpp index 87c83b0e3c..a4ca124c2d 100644 --- a/pcsx2/Patch.cpp +++ b/pcsx2/Patch.cpp @@ -449,28 +449,22 @@ void inifile_read(wxString name ) patchnumber = 0; - buffer = Path::Combine(L"patches", name + L".pnach"); + buffer = Path::Combine(L"patches", name + L".pnach"); -#ifndef _WIN32 - if (!f1.Open(buffer)) + if(!f1.Open(buffer) && wxFileName::IsCaseSensitive()) { - name.MakeUpper(); - buffer = Path::Combine(L"patches", name + L".pnach"); + name.MakeUpper(); + f1.Open( Path::Combine(L"patches", name + L".pnach") ); } -#endif - if (!f1.Open(buffer)) + if(!f1.IsOpened()) { - Console.WriteLn("No patch found. Resuming execution without a patch (this is NOT an error)." ); + Console.WriteLn( Color_Gray, "No patch found. Resuming execution without a patch (this is NOT an error)." ); return; } - else - { - Console.WriteLn("Opened!"); - } - //inifile_process( f1 ); + + Console.WriteLn( Color_Green, "Patch found!"); inifile_process( f1 ); - f1.Close(); } void _ApplyPatch(IniPatch *p)