mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Treat strings from external sources as 8-bit so FromAscii doesn't barf.
Ideally we should be more character set aware, but at the moment we use anonymous 7/8-bit strings in too many places. Fix use of AddGrowable{Col,Row}. Any (non-zero) rows/columns must have been created first by adding an item to it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5648 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -140,7 +140,7 @@ void GFXConfigDialogOGL::LoadShaders()
|
||||
std::string name = entry.children[i].virtualName.c_str();
|
||||
if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
|
||||
name = name.substr(0, name.size() - 4);
|
||||
arrayStringFor_PostShaderCB.Add(wxString::FromAscii(name.c_str()));
|
||||
arrayStringFor_PostShaderCB.Add(wxString::From8BitData(name.c_str()));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -207,7 +207,7 @@ void GFXConfigDialogOGL::InitializeGUIValues()
|
||||
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
|
||||
m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode);
|
||||
|
||||
wxString shader = wxString::FromAscii(g_Config.sPostProcessingShader.c_str());
|
||||
wxString shader = wxString::From8BitData(g_Config.sPostProcessingShader.c_str());
|
||||
if (shader == _(""))
|
||||
shader = wxT("(off)");
|
||||
m_PostShaderCB->SetStringSelection(shader);
|
||||
@ -548,7 +548,7 @@ void GFXConfigDialogOGL::EditShaderClick(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
if (m_PostShaderCB->GetStringSelection() == wxT("(off)"))
|
||||
return;
|
||||
wxString shader = wxString::FromAscii(File::GetUserPath(D_SHADERS_IDX)) + m_PostShaderCB->GetStringSelection() + _(".txt");
|
||||
wxString shader = wxString::From8BitData(File::GetUserPath(D_SHADERS_IDX)) + m_PostShaderCB->GetStringSelection() + _(".txt");
|
||||
if (wxFileExists(shader))
|
||||
{
|
||||
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("txt"));
|
||||
|
Reference in New Issue
Block a user