linux compilation fix

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4490 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut@gmail.com 2011-03-25 18:10:09 +00:00
parent 981f67ee01
commit 95e2ed9f21
2 changed files with 18 additions and 12 deletions

View File

@ -673,15 +673,17 @@ void AppConfig::FilenameOptions::LoadSave( IniInterface& ini )
for( int i=0; i<PluginId_Count; ++i )
{
if ( needRelativeName )
ini.Entry( tbl_PluginInfo[i].GetShortname(), wxFileName( Plugins[i].GetFullName() ), pc );
else
if ( needRelativeName ) {
wxFileName plugin_filename = wxFileName( Plugins[i].GetFullName() );
ini.Entry( tbl_PluginInfo[i].GetShortname(), plugin_filename, pc );
} else
ini.Entry( tbl_PluginInfo[i].GetShortname(), Plugins[i], pc );
}
if( needRelativeName )
ini.Entry( L"BIOS", wxFileName( Bios.GetFullName() ), pc );
else
if( needRelativeName ) {
wxFileName bios_filename = wxFileName( Bios.GetFullName() );
ini.Entry( L"BIOS", bios_filename, pc );
} else
ini.Entry( L"BIOS", Bios, pc );
}

View File

@ -23,16 +23,18 @@
#include <unistd.h>
#include <string.h>
#include "GS.h"
#include "Utilities/Path.h"
void SaveConfig()
{
const std::string iniFile(s_strIniPath + "zzogl-pg.ini");
const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
const char* iniFile = iniFile_s.mb_str();
FILE* f = fopen(iniFile.c_str(), "w");
FILE* f = fopen(iniFile, "w");
if (f == NULL)
{
ZZLog::Error_Log("Failed to open '%s'", iniFile.c_str());
ZZLog::Error_Log("Failed to open '%s'", iniFile);
return;
}
@ -66,12 +68,14 @@ void LoadConfig()
conf.height = 600;
conf.disableHacks = 0;
const std::string iniFile(s_strIniPath + "zzogl-pg.ini");
FILE* f = fopen(iniFile.c_str(), "r");
const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
const char* iniFile = iniFile_s.mb_str();
FILE* f = fopen(iniFile, "r");
if (f == NULL)
{
ZZLog::Error_Log("Failed to open '%s'", iniFile.c_str());
ZZLog::Error_Log("Failed to open '%s'", iniFile);
SaveConfig();//save and return
return;
}