From e26693f5d4f162d3f896371260b468434ad3e9dc Mon Sep 17 00:00:00 2001 From: sudonim1 Date: Fri, 25 Mar 2011 00:45:43 +0000 Subject: [PATCH] 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 --- pcsx2/PluginManager.cpp | 8 ++++---- pcsx2/gui/Panels/PluginSelectorPanel.cpp | 4 ++-- plugins/LilyPad/Config.cpp | 4 ++-- plugins/spu2-x/src/Windows/CfgHelpers.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pcsx2/PluginManager.cpp b/pcsx2/PluginManager.cpp index 8baeacfab6..4dff8595e2 100644 --- a/pcsx2/PluginManager.cpp +++ b/pcsx2/PluginManager.cpp @@ -1546,10 +1546,10 @@ void SysCorePlugins::SendSettingsFolder() ScopedLock lock( m_mtx_PluginStatus ); if( m_SettingsFolder.IsEmpty() ) return; - pxToUTF8 utf8buffer( m_SettingsFolder ); + wxCharBuffer buffer(m_SettingsFolder.mb_str(wxConvFile)); 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 ); } @@ -1572,10 +1572,10 @@ void SysCorePlugins::SendLogFolder() ScopedLock lock( m_mtx_PluginStatus ); if( m_LogFolder.IsEmpty() ) return; - pxToUTF8 utf8buffer( m_LogFolder ); + wxCharBuffer buffer(m_LogFolder.mb_str(wxConvFile)); 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 ); } diff --git a/pcsx2/gui/Panels/PluginSelectorPanel.cpp b/pcsx2/gui/Panels/PluginSelectorPanel.cpp index 38ce8556b5..841f4c12d5 100644 --- a/pcsx2/gui/Panels/PluginSelectorPanel.cpp +++ b/pcsx2/gui/Panels/PluginSelectorPanel.cpp @@ -652,12 +652,12 @@ void Panels::PluginSelectorPanel::OnConfigure_Clicked( wxCommandEvent& evt ) 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" ) ) { - func( GetLogFolder().ToUTF8() ); + func( GetLogFolder().ToString().mb_str(wxConvFile) ); } } diff --git a/plugins/LilyPad/Config.cpp b/plugins/LilyPad/Config.cpp index cd16f07553..75964a5300 100644 --- a/plugins/LilyPad/Config.cpp +++ b/plugins/LilyPad/Config.cpp @@ -279,8 +279,8 @@ void CALLBACK PADsetSettingsDir( const char *dir ) // emulator assures a trailing slash/backslash (yay!) //swprintf_s( iniFile, L"%S", (dir==NULL) ? "inis\\" : dir ); - //uint targlen = MultiByteToWideChar(CP_UTF8, 0, dir, -1, NULL, 0); - MultiByteToWideChar(CP_UTF8, 0, dir, -1, iniFile, MAX_PATH*2); + //uint targlen = MultiByteToWideChar(CP_ACP, 0, dir, -1, NULL, 0); + MultiByteToWideChar(CP_ACP, 0, dir, -1, iniFile, MAX_PATH*2); wcscat_s(iniFile, L"LilyPad.ini"); createIniDir = false; diff --git a/plugins/spu2-x/src/Windows/CfgHelpers.cpp b/plugins/spu2-x/src/Windows/CfgHelpers.cpp index d9ff3a77c3..eb789a30cd 100644 --- a/plugins/spu2-x/src/Windows/CfgHelpers.cpp +++ b/plugins/spu2-x/src/Windows/CfgHelpers.cpp @@ -55,7 +55,7 @@ static wxString CfgFile( L"inis\\SPU2-X.ini" ); 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" ); }