mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -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:
@ -41,7 +41,7 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id, const wx
|
||||
m_buttonEnableDTKMusic = new wxCheckBox(this, ID_ENABLE_DTK_MUSIC, wxT("Enable DTK Music"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, wxT("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, wxT("Audio Backend"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
||||
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(110, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
||||
|
||||
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
||||
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
|
||||
|
@ -44,7 +44,7 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
|
||||
m_buttonEnableThrottle = new wxCheckBox(this, ID_ENABLE_THROTTLE, wxT("Enable Audio Throttle"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
m_buttonEnableJIT = new wxCheckBox(this, ID_ENABLE_JIT, wxT("Enable JIT Dynarec"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
wxStaticText *BackendText = new wxStaticText(this, wxID_ANY, wxT("Audio Backend"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(90, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
||||
m_BackendSelection = new wxChoice(this, ID_BACKEND, wxDefaultPosition, wxSize(110, 20), wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
||||
|
||||
m_volumeSlider = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
||||
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
|
||||
|
@ -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