mirror of https://github.com/PCSX2/pcsx2.git
Changed plugin API back to system locale for paths since only two plugins (lilypad and spu2-x) were specifically expecting UTF-8 and handling it correctly and breaking them is easier than fixing all the others for now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4483 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d4f95b004b
commit
e26693f5d4
|
@ -1546,10 +1546,10 @@ void SysCorePlugins::SendSettingsFolder()
|
||||||
ScopedLock lock( m_mtx_PluginStatus );
|
ScopedLock lock( m_mtx_PluginStatus );
|
||||||
if( m_SettingsFolder.IsEmpty() ) return;
|
if( m_SettingsFolder.IsEmpty() ) return;
|
||||||
|
|
||||||
pxToUTF8 utf8buffer( m_SettingsFolder );
|
wxCharBuffer buffer(m_SettingsFolder.mb_str(wxConvFile));
|
||||||
|
|
||||||
const PluginInfo* pi = tbl_PluginInfo; do {
|
const PluginInfo* pi = tbl_PluginInfo; do {
|
||||||
if( m_info[pi->id] ) m_info[pi->id]->CommonBindings.SetSettingsDir( utf8buffer );
|
if( m_info[pi->id] ) m_info[pi->id]->CommonBindings.SetSettingsDir( buffer );
|
||||||
} while( ++pi, pi->shortname != NULL );
|
} while( ++pi, pi->shortname != NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1572,10 +1572,10 @@ void SysCorePlugins::SendLogFolder()
|
||||||
ScopedLock lock( m_mtx_PluginStatus );
|
ScopedLock lock( m_mtx_PluginStatus );
|
||||||
if( m_LogFolder.IsEmpty() ) return;
|
if( m_LogFolder.IsEmpty() ) return;
|
||||||
|
|
||||||
pxToUTF8 utf8buffer( m_LogFolder );
|
wxCharBuffer buffer(m_LogFolder.mb_str(wxConvFile));
|
||||||
|
|
||||||
const PluginInfo* pi = tbl_PluginInfo; do {
|
const PluginInfo* pi = tbl_PluginInfo; do {
|
||||||
if( m_info[pi->id] ) m_info[pi->id]->CommonBindings.SetLogDir( utf8buffer );
|
if( m_info[pi->id] ) m_info[pi->id]->CommonBindings.SetLogDir( buffer );
|
||||||
} while( ++pi, pi->shortname != NULL );
|
} while( ++pi, pi->shortname != NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -652,12 +652,12 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt )
|
||||||
|
|
||||||
if( SetDirFnptr func = (SetDirFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"setSettingsDir" ) )
|
if( SetDirFnptr func = (SetDirFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"setSettingsDir" ) )
|
||||||
{
|
{
|
||||||
func( GetSettingsFolder().ToUTF8() );
|
func( GetSettingsFolder().ToString().mb_str(wxConvFile) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( SetDirFnptr func = (SetDirFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"setLogDir" ) )
|
if( SetDirFnptr func = (SetDirFnptr)dynlib.GetSymbol( tbl_PluginInfo[pid].GetShortname() + L"setLogDir" ) )
|
||||||
{
|
{
|
||||||
func( GetLogFolder().ToUTF8() );
|
func( GetLogFolder().ToString().mb_str(wxConvFile) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,8 +279,8 @@ void CALLBACK PADsetSettingsDir( const char *dir )
|
||||||
// emulator assures a trailing slash/backslash (yay!)
|
// emulator assures a trailing slash/backslash (yay!)
|
||||||
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir );
|
//swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir );
|
||||||
|
|
||||||
//uint targlen = MultiByteToWideChar(CP_UTF8, 0, dir, -1, NULL, 0);
|
//uint targlen = MultiByteToWideChar(CP_ACP, 0, dir, -1, NULL, 0);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, dir, -1, iniFile, MAX_PATH*2);
|
MultiByteToWideChar(CP_ACP, 0, dir, -1, iniFile, MAX_PATH*2);
|
||||||
wcscat_s(iniFile, L"LilyPad.ini");
|
wcscat_s(iniFile, L"LilyPad.ini");
|
||||||
|
|
||||||
createIniDir = false;
|
createIniDir = false;
|
||||||
|
|
|
@ -55,7 +55,7 @@ static wxString CfgFile( L"inis\\SPU2-X.ini" );
|
||||||
|
|
||||||
void CfgSetSettingsDir( const char* dir )
|
void CfgSetSettingsDir( const char* dir )
|
||||||
{
|
{
|
||||||
CfgFile = Path::Combine( (dir==NULL) ? wxString(L"inis") : fromUTF8(dir), L"SPU2-X.ini" );
|
CfgFile = Path::Combine( (dir==NULL) ? wxString(L"inis") : wxString(dir, wxConvFile), L"SPU2-X.ini" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue