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:
sudonim1 2011-03-25 00:45:43 +00:00
parent d4f95b004b
commit e26693f5d4
4 changed files with 9 additions and 9 deletions

View File

@ -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 );
} }

View File

@ -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) );
} }
} }

View File

@ -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;

View File

@ -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" );
} }