some more fixes for the switch to unicode. Thanks sl1nk3.s

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3925 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99 2009-08-02 05:59:55 +00:00
parent 7b19632b4a
commit 6cbeeafdf1
10 changed files with 26 additions and 28 deletions

View File

@ -365,7 +365,7 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event)
menu.Append(IDM_ADDFUNCTION, _T("&Add function"));
menu.Append(IDM_JITRESULTS, wxString::FromAscii("PPC vs X86"));
menu.Append(IDM_INSERTBLR, wxString::FromAscii("Insert &blr"));
menu.Append(IDM_INSERTNOP, wxString::FromAscii("Insert &nop"));
menu.Append(IDM_INSERTNOP, wxString::FromAscii("Insert &nop"));
menu.Append(IDM_PATCHALERT, wxString::FromAscii("Patch alert"));
PopupMenu(&menu);
event.Skip(true);

View File

@ -240,8 +240,8 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
if (path) {
SignatureDB db;
db.Initialize(&g_symbolDB, prefix.c_str());
std::string filename(path.ToAscii()); // PPCAnalyst::SaveSignatureDB(
db.Save(path.ToAscii());
std::string filename(path.mb_str()); // PPCAnalyst::SaveSignatureDB(
db.Save(path.mb_str());
}
}
}
@ -254,7 +254,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
this);
if (path) {
SignatureDB db;
db.Load(path.ToAscii());
db.Load(path.mb_str());
db.Apply(&g_symbolDB);
}
}

View File

@ -229,7 +229,7 @@ void CJitWindow::Compare(u32 em_address)
ppc_box->SetValue(wxString::FromAscii((char*)xDis));
} else {
ppc_box->SetValue(wxString::FromAscii(StringFromFormat("(non-code address: %08x)", em_address).c_str()));
x86_box->SetValue(wxString::FromAscii("---"));
x86_box->SetValue(wxString::FromAscii("---"));
}

View File

@ -118,7 +118,7 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
// Update selected ISO paths
for(u32 i = 0; i < SConfig::GetInstance().m_ISOFolder.size(); i++)
{
ISOPaths->Append(wxString(SConfig::GetInstance().m_ISOFolder[i].c_str(), wxConvUTF8));
ISOPaths->Append(wxString::FromAscii(SConfig::GetInstance().m_ISOFolder[i].c_str()));
}
}
@ -890,7 +890,7 @@ void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
SConfig::GetInstance().m_ISOFolder.clear();
for (unsigned int i = 0; i < ISOPaths->GetCount(); i++)
SConfig::GetInstance().m_ISOFolder.push_back(std::string(ISOPaths->GetStrings()[i].mb_str(wxConvUTF8)));
SConfig::GetInstance().m_ISOFolder.push_back(std::string(ISOPaths->GetStrings()[i].mb_str()));
}
void CConfigMain::RecursiveDirectoryChanged(wxCommandEvent& WXUNUSED (event))
@ -901,12 +901,12 @@ void CConfigMain::RecursiveDirectoryChanged(wxCommandEvent& WXUNUSED (event))
void CConfigMain::DefaultISOChanged(wxFileDirPickerEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM = DefaultISO->GetPath().ToAscii();
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM = DefaultISO->GetPath().mb_str();
}
void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = DVDRoot->GetPath().ToAscii();
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = DVDRoot->GetPath().mb_str();
}
//////////////////////////////////////////////////////////////////////////

View File

@ -461,7 +461,7 @@ void CFrame::DoOpen(bool Boot)
{
if (!fileChosen)
return;
BootManager::BootCore(std::string(path.ToAscii()));
BootManager::BootCore(std::string(path.mb_str()));
}
else
{
@ -662,7 +662,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event))
this);
if(path)
State_LoadAs((const char *)path.ToAscii());
State_LoadAs((const char*)path.mb_str());
}
void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
@ -680,7 +680,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
this);
if(path)
State_SaveAs((const char *)path.ToAscii());
State_SaveAs((const char*)path.mb_str());
}
void CFrame::OnLoadLastState(wxCommandEvent& WXUNUSED (event))

View File

@ -159,7 +159,7 @@ void CGameListCtrl::BrowseForDirectory()
if (dialog.ShowModal() == wxID_OK)
{
std::string sPath(dialog.GetPath().mb_str(wxConvUTF8));
std::string sPath(dialog.GetPath().mb_str());
std::vector<std::string>::iterator itResult = std::find(
SConfig::GetInstance().m_ISOFolder.begin(), SConfig::GetInstance().m_ISOFolder.end(), sPath
);
@ -239,7 +239,7 @@ void CGameListCtrl::Update()
}
else
{
std::string errorString;
wxString errorString;
if ((SConfig::GetInstance().m_ListGC ||
SConfig::GetInstance().m_ListWii ||
SConfig::GetInstance().m_ListWad) &&
@ -247,15 +247,15 @@ void CGameListCtrl::Update()
SConfig::GetInstance().m_ListUsa ||
SConfig::GetInstance().m_ListPal))
{
errorString = "Dolphin could not find any GC/Wii ISOs. Doubleclick here to browse for files...";
errorString = _("Dolphin could not find any GC/Wii ISOs. Doubleclick here to browse for files...");
}
else
{
errorString = "Dolphin is currently set to hide all games. Doubleclick here to show all games...";
errorString = _("Dolphin is currently set to hide all games. Doubleclick here to show all games...");
}
InsertColumn(COLUMN_BANNER, _("No ISOs or WADS found"));
long index = InsertItem(0, wxString::FromAscii("msgRow"));
SetItem(index, COLUMN_BANNER, wxString::FromAscii(errorString.c_str()));
SetItem(index, COLUMN_BANNER, errorString);
SetItemFont(index, *wxITALIC_FONT);
SetColumnWidth(COLUMN_BANNER, wxLIST_AUTOSIZE);
}

View File

@ -132,7 +132,7 @@ bool DolphinApp::OnInit()
if (!noCheckForInstallDir)
{
char tmp[1024];
sprintf(tmp, "%s/.dolphin%swd", (const char*)wxStandardPaths::Get().GetUserConfigDir().mb_str(wxConvUTF8),
sprintf(tmp, "%s/.dolphin%swd", (const char*)wxStandardPaths::Get().GetUserConfigDir().mb_str(),
#ifdef _M_IX86
"x32");
#else
@ -152,7 +152,7 @@ bool DolphinApp::OnInit()
else
{
char CWD[1024];
sprintf(CWD, "%s", (const char*)wxGetCwd().mb_str(wxConvUTF8));
sprintf(CWD, "%s", (const char*)wxGetCwd().mb_str());
if (PanicYesNo("Set install location to:\n %s ?", CWD))
{
FILE* workingDirF = fopen(tmp, "w");
@ -320,7 +320,7 @@ bool DolphinApp::OnInit()
// First check if we have a elf command line. Todo: Should we place this under #if wxUSE_CMDLINE_PARSER?
if (LoadElf && ElfFile != wxEmptyString)
{
BootManager::BootCore(std::string(ElfFile.ToAscii()));
BootManager::BootCore(std::string(ElfFile.mb_str()));
}
/* If we have selected Automatic Start, start the default ISO, or if no default
ISO exists, start the last loaded ISO */

View File

@ -291,7 +291,7 @@ void CMemcardManager::CreateGUIControls()
m_Delete[i]->Disable();
if (strcmp(DefaultMemcard[i].c_str(), "."))
{
m_MemcardPath[i]->SetPath(wxString::FromAscii(DefaultMemcard[i].c_str()));
m_MemcardPath[i]->SetPath(wxString::FromAscii(DefaultMemcard[i].c_str()));
ChangePath(ID_MEMCARDPATH_A + i);
}
}
@ -564,7 +564,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
wxFileSelectorDefaultWildcardStr
),
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
const char * fileName = temp.ToAscii();
const char * fileName = temp.mb_str();
if (!temp.empty() && !fileName2.empty())
{
wxString temp2 = wxFileSelector(wxT("Save GCI as.."),
@ -608,10 +608,10 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
if (temp.length() > 0)
{
const char * fileName = temp.ToAscii();
const char * fileName = temp.mb_str();
if (!CopyDeleteSwitch(memoryCard[slot]->ExportGci(index, fileName, NULL), -1))
{
File::Delete(temp.ToAscii());
File::Delete(temp.mb_str());
}
}
}

View File

@ -140,7 +140,7 @@ void DSPDebuggerHLE::ReadDir()
if (pieces[3] == "GC")
{
gc_files.push_back(pieces[0]);
m_gc->Append(wxString::FromAscii(cut.c_str()));
m_gc->Append(wxString::FromAscii(cut.c_str()));
}
else
{
@ -295,5 +295,3 @@ void DSPDebuggerHLE::MailSettings(wxCommandEvent& event)
StoreMails = m_gcwiiset->IsChecked(1);
}

View File

@ -345,7 +345,7 @@ void PADConfigDialognJoy::ToBlank(bool ToBlank)
{
for(int i = IDB_ANALOG_MAIN_X; i <= IDB_BUTTONHALFPRESS; i++)
#ifndef _WIN32
if(!strcmp(GetButtonText(i, j).ToAscii(), "-1")) SetButtonText(i, "", j);
if(!strcmp(GetButtonText(i, j).mb_str(), "-1")) SetButtonText(i, "", j);
#else
if(GetButtonText(i, j) == wxT("-1")) SetButtonText(i, "", j);
#endif