zzogl-pg: fix configuration load/save error. Howerver, need to find a way to restore the error messages.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4513 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2011-03-30 16:38:57 +00:00
parent 6dcccff206
commit 9afb0d9edf
1 changed files with 6 additions and 8 deletions

View File

@ -27,14 +27,13 @@
void SaveConfig() void SaveConfig()
{ {
const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg.ini")); const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
const char* iniFile = iniFile_s.mb_str();
FILE* f = fopen(iniFile, "w"); FILE* f = fopen(iniFile.mb_str(), "w");
if (f == NULL) if (f == NULL)
{ {
ZZLog::Error_Log("Failed to open '%s'", iniFile); // ZZLog::Error_Log("Failed to open '%s'", iniFile.mb_str());
return; return;
} }
@ -68,14 +67,13 @@ void LoadConfig()
conf.height = 600; conf.height = 600;
conf.disableHacks = 0; conf.disableHacks = 0;
const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg.ini")); const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
const char* iniFile = iniFile_s.mb_str();
FILE* f = fopen(iniFile, "r"); FILE* f = fopen(iniFile.mb_str(), "r");
if (f == NULL) if (f == NULL)
{ {
ZZLog::Error_Log("Failed to open '%s'", iniFile); // ZZLog::Error_Log("Failed to open '%s'", iniFile.mb_str());
SaveConfig();//save and return SaveConfig();//save and return
return; return;
} }