More multi-byte display fix

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4750 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx 2009-12-29 18:25:45 +00:00
parent 03c45646b4
commit 50139a394b
5 changed files with 15 additions and 15 deletions

View File

@ -48,7 +48,7 @@ void CARCodeAddEdit::CreateGUIControls(int _selection)
}
else
{
currentName = wxString::FromAscii(arCodes.at(_selection).name.c_str());
currentName = wxString(arCodes.at(_selection).name.c_str(), *wxConvCurrent);
tempEntries = arCodes.at(_selection);
}
@ -94,7 +94,7 @@ void CARCodeAddEdit::OnClose(wxCloseEvent& WXUNUSED (event))
void CARCodeAddEdit::ChangeEntry(wxSpinEvent& event)
{
ActionReplay::ARCode currentCode = arCodes.at((int)arCodes.size() - event.GetPosition());
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
EditCheatName->SetValue(wxString(currentCode.name.c_str(), *wxConvCurrent));
UpdateTextCtrl(currentCode);
}

View File

@ -147,7 +147,7 @@ void wxCheatsWindow::Load_ARCodes()
{
ARCode code = GetARCode(i);
ARCodeIndex ind;
u32 index = m_CheckListBox_CheatsList->Append(wxString::FromAscii(code.name.c_str()));
u32 index = m_CheckListBox_CheatsList->Append(wxString(code.name.c_str(), *wxConvCurrent));
m_CheckListBox_CheatsList->Check(index, code.active);
ind.index = i;
ind.uiIndex = index;
@ -162,7 +162,7 @@ void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (e
if ((int)indexList[i].uiIndex == index)
{
ARCode code = GetARCode(i);
m_Label_Codename->SetLabel(wxT("Name: ") + wxString::FromAscii(code.name.c_str()));
m_Label_Codename->SetLabel(wxT("Name: ") + wxString(code.name.c_str(), *wxConvCurrent));
char text[CHAR_MAX];
char* numcodes = text;
sprintf(numcodes, "Number of Codes: %lu", (unsigned long)code.ops.size());

View File

@ -499,7 +499,7 @@ void CGameListCtrl::ScanForISOs()
wxString msg;
char tempstring[128];
sprintf(tempstring,"Scanning %s", FileName.c_str());
msg = wxString::FromAscii(tempstring);
msg = wxString(tempstring, *wxConvCurrent);
// Update with the progress (i) and the message (msg)
bool Cont = dialog.Update(i, msg);
@ -763,7 +763,7 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event)
{
char temp[2048];
sprintf(temp, "^ %s%s%s", emuState[nState -1].c_str(), issues.size() > 0 ? " :\n" : "", issues.c_str());
toolTip = new wxEmuStateTip(this, wxString::FromAscii(temp), &toolTip);
toolTip = new wxEmuStateTip(this, wxString(temp, *wxConvCurrent), &toolTip);
}
else
toolTip = new wxEmuStateTip(this, wxT("Not Set"), &toolTip);
@ -1050,7 +1050,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
void CGameListCtrl::CompressCB(const char* text, float percent, void* arg)
{
((wxProgressDialog*)arg)->Update((int)(percent*1000), wxString::FromAscii(text));
((wxProgressDialog*)arg)->Update((int)(percent*1000), wxString(text, *wxConvCurrent));
}
void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
@ -1068,7 +1068,7 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
{
path = wxFileSelector(
_T("Save decompressed ISO"),
wxEmptyString, wxString::FromAscii(FileName.c_str()), wxEmptyString,
wxEmptyString, wxString(FileName.c_str(), *wxConvCurrent), wxEmptyString,
wxString::Format
(
_T("All GC/Wii ISO files (gcm)|*.gcm|All files (%s)|%s"),
@ -1087,7 +1087,7 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
{
path = wxFileSelector(
_T("Save compressed ISO"),
wxEmptyString, wxString::FromAscii(FileName.c_str()), wxEmptyString,
wxEmptyString, wxString(FileName.c_str(), *wxConvCurrent), wxEmptyString,
wxString::Format
(
_T("All compressed GC/Wii ISO files (gcz)|*.gcz|All files (%s)|%s"),

View File

@ -865,7 +865,7 @@ void CISOProperties::LoadGameConfig()
GameIni.Get("EmuState", "EmulationIssues", &sTemp);
if (!sTemp.empty())
{
EmuIssues->SetValue(wxString::FromAscii(sTemp.c_str()));
EmuIssues->SetValue(wxString(sTemp.c_str(), *wxConvCurrent));
bRefreshList = true;
}
EmuIssues->Enable(EmuState->GetSelection() != 0);
@ -951,7 +951,7 @@ bool CISOProperties::SaveGameConfig()
else
GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection());
GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(wxConvUTF8));
GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent));
PatchList_Save();
ActionReplayList_Save();
@ -1024,7 +1024,7 @@ void CISOProperties::PatchList_Load()
for (std::vector<PatchEngine::Patch>::const_iterator it = onFrame.begin(); it != onFrame.end(); ++it)
{
PatchEngine::Patch p = *it;
Patches->Append(wxString::FromAscii(p.name.c_str()));
Patches->Append(wxString(p.name.c_str(), *wxConvCurrent));
Patches->Check(index, p.active);
++index;
}
@ -1068,7 +1068,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
CPatchAddEdit dlg(-1, this, 1, _("Add Patch"));
if (dlg.ShowModal() == wxID_OK)
{
Patches->Append(wxString::FromAscii(onFrame.back().name.c_str()));
Patches->Append(wxString(onFrame.back().name.c_str(), *wxConvCurrent));
Patches->Check((unsigned int)(onFrame.size() - 1), onFrame.back().active);
}
}
@ -1097,7 +1097,7 @@ void CISOProperties::ActionReplayList_Load()
for (std::vector<ActionReplay::ARCode>::const_iterator it = arCodes.begin(); it != arCodes.end(); ++it)
{
ActionReplay::ARCode arCode = *it;
Cheats->Append(wxString::FromAscii(arCode.name.c_str()));
Cheats->Append(wxString(arCode.name.c_str(), *wxConvCurrent));
Cheats->Check(index, arCode.active);
++index;
}

View File

@ -49,7 +49,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
}
else
{
currentName = wxString::FromAscii(onFrame.at(_selection).name.c_str());
currentName = wxString(onFrame.at(_selection).name.c_str(), *wxConvCurrent);
tempEntries = onFrame.at(_selection).entries;
}