mirror of https://github.com/PCSX2/pcsx2.git
linux compilation fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4490 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
981f67ee01
commit
95e2ed9f21
|
@ -673,15 +673,17 @@ void AppConfig::FilenameOptions::LoadSave( IniInterface& ini )
|
||||||
|
|
||||||
for( int i=0; i<PluginId_Count; ++i )
|
for( int i=0; i<PluginId_Count; ++i )
|
||||||
{
|
{
|
||||||
if ( needRelativeName )
|
if ( needRelativeName ) {
|
||||||
ini.Entry( tbl_PluginInfo[i].GetShortname(), wxFileName( Plugins[i].GetFullName() ), pc );
|
wxFileName plugin_filename = wxFileName( Plugins[i].GetFullName() );
|
||||||
else
|
ini.Entry( tbl_PluginInfo[i].GetShortname(), plugin_filename, pc );
|
||||||
|
} else
|
||||||
ini.Entry( tbl_PluginInfo[i].GetShortname(), Plugins[i], pc );
|
ini.Entry( tbl_PluginInfo[i].GetShortname(), Plugins[i], pc );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( needRelativeName )
|
if( needRelativeName ) {
|
||||||
ini.Entry( L"BIOS", wxFileName( Bios.GetFullName() ), pc );
|
wxFileName bios_filename = wxFileName( Bios.GetFullName() );
|
||||||
else
|
ini.Entry( L"BIOS", bios_filename, pc );
|
||||||
|
} else
|
||||||
ini.Entry( L"BIOS", Bios, pc );
|
ini.Entry( L"BIOS", Bios, pc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,16 +23,18 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
|
#include "Utilities/Path.h"
|
||||||
|
|
||||||
void SaveConfig()
|
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)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
ZZLog::Error_Log("Failed to open '%s'", iniFile.c_str());
|
ZZLog::Error_Log("Failed to open '%s'", iniFile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,12 +68,14 @@ void LoadConfig()
|
||||||
conf.height = 600;
|
conf.height = 600;
|
||||||
conf.disableHacks = 0;
|
conf.disableHacks = 0;
|
||||||
|
|
||||||
const std::string iniFile(s_strIniPath + "zzogl-pg.ini");
|
const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg.ini"));
|
||||||
FILE* f = fopen(iniFile.c_str(), "r");
|
const char* iniFile = iniFile_s.mb_str();
|
||||||
|
|
||||||
|
FILE* f = fopen(iniFile, "r");
|
||||||
|
|
||||||
if (f == NULL)
|
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
|
SaveConfig();//save and return
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue