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:
parent
0b00faa378
commit
b7c2e523b3
|
@ -68,12 +68,12 @@ void CARCodeAddEdit::CreateGUIControls(int _selection)
|
||||||
wxButton* bOK = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
wxButton* bOK = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
wxButton* bCancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
wxButton* bCancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
|
||||||
sgEntry->AddGrowableCol(1);
|
|
||||||
sgEntry->AddGrowableRow(1);
|
|
||||||
sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5);
|
sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5);
|
||||||
sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND|wxALL, 5);
|
||||||
sgEntry->Add(EditCheatCode, wxGBPosition(1, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EditCheatCode, wxGBPosition(1, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
|
||||||
|
sgEntry->AddGrowableCol(1);
|
||||||
|
sgEntry->AddGrowableRow(1);
|
||||||
sbEntry->Add(sgEntry, 1, wxEXPAND|wxALL);
|
sbEntry->Add(sgEntry, 1, wxEXPAND|wxALL);
|
||||||
|
|
||||||
sEditCheatButtons->AddStretchSpacer();
|
sEditCheatButtons->AddStretchSpacer();
|
||||||
|
|
|
@ -938,7 +938,7 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
|
||||||
{
|
{
|
||||||
std::string filename = std::string(wxFileSelector(
|
std::string filename = std::string(wxFileSelector(
|
||||||
wxT("Choose a file to open"),
|
wxT("Choose a file to open"),
|
||||||
wxString::FromAscii(File::GetUserPath(D_GCUSER_IDX)),
|
wxString::From8BitData(File::GetUserPath(D_GCUSER_IDX)),
|
||||||
isSlotA ? wxT(GC_MEMCARDA) : wxT(GC_MEMCARDB),
|
isSlotA ? wxT(GC_MEMCARDA) : wxT(GC_MEMCARDB),
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
wxT("Gamecube Memory Cards (*.raw,*.gcp)|*.raw;*.gcp")).mb_str());
|
wxT("Gamecube Memory Cards (*.raw,*.gcp)|*.raw;*.gcp")).mb_str());
|
||||||
|
|
|
@ -126,7 +126,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
if (GameIni.Load(GameIniFile.c_str()))
|
if (GameIni.Load(GameIniFile.c_str()))
|
||||||
LoadGameConfig();
|
LoadGameConfig();
|
||||||
else
|
else
|
||||||
wxMessageBox(wxString::Format(_("Could not create %s"), wxString::FromAscii(GameIniFile.c_str()).c_str()), _("Error"), wxOK|wxICON_ERROR, this);
|
wxMessageBox(wxString::Format(_("Could not create %s"), wxString::From8BitData(GameIniFile.c_str()).c_str()), _("Error"), wxOK|wxICON_ERROR, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disk header and apploader
|
// Disk header and apploader
|
||||||
|
@ -168,9 +168,9 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||||
m_Country->SetValue(wxT("UNKNOWN"));
|
m_Country->SetValue(wxT("UNKNOWN"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wxString temp = _T("0x") + wxString::FromAscii(OpenISO->GetMakerID().c_str());
|
wxString temp = _T("0x") + wxString::From8BitData(OpenISO->GetMakerID().c_str());
|
||||||
m_MakerID->SetValue(temp);
|
m_MakerID->SetValue(temp);
|
||||||
m_Date->SetValue(wxString::FromAscii(OpenISO->GetApploaderDate().c_str()));
|
m_Date->SetValue(wxString::From8BitData(OpenISO->GetApploaderDate().c_str()));
|
||||||
m_FST->SetValue(wxString::Format(_T("%u"), OpenISO->GetFSTSize()));
|
m_FST->SetValue(wxString::Format(_T("%u"), OpenISO->GetFSTSize()));
|
||||||
|
|
||||||
// Here we set all the info to be shown (be it SJIS or Ascii) + we set the window title
|
// Here we set all the info to be shown (be it SJIS or Ascii) + we set the window title
|
||||||
|
@ -239,12 +239,12 @@ size_t CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,
|
||||||
// check next index
|
// check next index
|
||||||
if (rFileInfo->IsDirectory())
|
if (rFileInfo->IsDirectory())
|
||||||
{
|
{
|
||||||
wxTreeItemId item = m_Treectrl->AppendItem(parent, wxString::FromAscii(itemName), 1, 1);
|
wxTreeItemId item = m_Treectrl->AppendItem(parent, wxString::From8BitData(itemName), 1, 1);
|
||||||
CurrentIndex = CreateDirectoryTree(item, fileInfos, CurrentIndex + 1, (size_t)rFileInfo->m_FileSize);
|
CurrentIndex = CreateDirectoryTree(item, fileInfos, CurrentIndex + 1, (size_t)rFileInfo->m_FileSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_Treectrl->AppendItem(parent, wxString::FromAscii(itemName), 2, 2);
|
m_Treectrl->AppendItem(parent, wxString::From8BitData(itemName), 2, 2);
|
||||||
CurrentIndex++;
|
CurrentIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,10 +409,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sCheatPage->Layout();
|
sCheatPage->Layout();
|
||||||
|
|
||||||
|
|
||||||
// ISO Details
|
|
||||||
sbISODetails = new wxStaticBoxSizer(wxVERTICAL, m_Information, _("ISO Details"));
|
|
||||||
sISODetails = new wxGridBagSizer(0, 0);
|
|
||||||
// XXX sISODetails->AddGrowableCol(0);
|
|
||||||
m_NameText = new wxStaticText(m_Information, ID_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize);
|
m_NameText = new wxStaticText(m_Information, ID_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize);
|
||||||
m_Name = new wxTextCtrl(m_Information, ID_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
|
m_Name = new wxTextCtrl(m_Information, ID_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
|
||||||
m_GameIDText = new wxStaticText(m_Information, ID_GAMEID_TEXT, _("Game ID:"), wxDefaultPosition, wxDefaultSize);
|
m_GameIDText = new wxStaticText(m_Information, ID_GAMEID_TEXT, _("Game ID:"), wxDefaultPosition, wxDefaultSize);
|
||||||
|
@ -426,10 +422,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
m_FSTText = new wxStaticText(m_Information, ID_FST_TEXT, _("FST Size:"), wxDefaultPosition, wxDefaultSize);
|
m_FSTText = new wxStaticText(m_Information, ID_FST_TEXT, _("FST Size:"), wxDefaultPosition, wxDefaultSize);
|
||||||
m_FST = new wxTextCtrl(m_Information, ID_FST, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
|
m_FST = new wxTextCtrl(m_Information, ID_FST, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
|
||||||
|
|
||||||
// Banner Details
|
|
||||||
sbBannerDetails = new wxStaticBoxSizer(wxVERTICAL, m_Information, _("Banner Details"));
|
|
||||||
sBannerDetails = new wxGridBagSizer(0, 0);
|
|
||||||
// XXX sBannerDetails->AddGrowableCol(1); sBannerDetails->AddGrowableCol(2); sBannerDetails->AddGrowableCol(3);
|
|
||||||
m_LangText = new wxStaticText(m_Information, ID_LANG_TEXT, _("Show Language:"), wxDefaultPosition, wxDefaultSize);
|
m_LangText = new wxStaticText(m_Information, ID_LANG_TEXT, _("Show Language:"), wxDefaultPosition, wxDefaultSize);
|
||||||
arrayStringFor_Lang.Add(_("English"));
|
arrayStringFor_Lang.Add(_("English"));
|
||||||
arrayStringFor_Lang.Add(_("German"));
|
arrayStringFor_Lang.Add(_("German"));
|
||||||
|
@ -448,8 +440,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
m_BannerText = new wxStaticText(m_Information, ID_BANNER_TEXT, _("Banner:"), wxDefaultPosition, wxDefaultSize);
|
m_BannerText = new wxStaticText(m_Information, ID_BANNER_TEXT, _("Banner:"), wxDefaultPosition, wxDefaultSize);
|
||||||
m_Banner = new wxStaticBitmap(m_Information, ID_BANNER, wxNullBitmap, wxDefaultPosition, wxSize(96, 32), 0);
|
m_Banner = new wxStaticBitmap(m_Information, ID_BANNER, wxNullBitmap, wxDefaultPosition, wxSize(96, 32), 0);
|
||||||
|
|
||||||
wxBoxSizer* sInfoPage;
|
// ISO Details
|
||||||
sInfoPage = new wxBoxSizer(wxVERTICAL);
|
sISODetails = new wxGridBagSizer(0, 0);
|
||||||
sISODetails->Add(m_NameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sISODetails->Add(m_NameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sISODetails->Add(m_Name, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sISODetails->Add(m_Name, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sISODetails->Add(m_GameIDText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sISODetails->Add(m_GameIDText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
@ -462,8 +454,12 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sISODetails->Add(m_Date, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sISODetails->Add(m_Date, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sISODetails->Add(m_FSTText, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sISODetails->Add(m_FSTText, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sISODetails->Add(m_FST, wxGBPosition(5, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sISODetails->Add(m_FST, wxGBPosition(5, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
|
sISODetails->AddGrowableCol(0);
|
||||||
|
sbISODetails = new wxStaticBoxSizer(wxVERTICAL, m_Information, _("ISO Details"));
|
||||||
sbISODetails->Add(sISODetails, 0, wxEXPAND, 5);
|
sbISODetails->Add(sISODetails, 0, wxEXPAND, 5);
|
||||||
|
|
||||||
|
// Banner Details
|
||||||
|
sBannerDetails = new wxGridBagSizer(0, 0);
|
||||||
sBannerDetails->Add(m_LangText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sBannerDetails->Add(m_LangText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sBannerDetails->Add(m_Lang, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sBannerDetails->Add(m_Lang, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sBannerDetails->Add(m_ShortText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sBannerDetails->Add(m_ShortText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
@ -474,19 +470,22 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sBannerDetails->Add(m_Comment, wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sBannerDetails->Add(m_Comment, wxGBPosition(3, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sBannerDetails->Add(m_BannerText, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 5);
|
sBannerDetails->Add(m_BannerText, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 5);
|
||||||
sBannerDetails->Add(m_Banner, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sBannerDetails->Add(m_Banner, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sbBannerDetails->Add(sBannerDetails, 0, wxEXPAND, 0);
|
sBannerDetails->AddGrowableCol(1);
|
||||||
|
sbBannerDetails = new wxStaticBoxSizer(wxVERTICAL, m_Information, _("Banner Details"));
|
||||||
|
sbBannerDetails->Add(sBannerDetails, 0, wxEXPAND, 5);
|
||||||
|
|
||||||
|
wxBoxSizer* sInfoPage;
|
||||||
|
sInfoPage = new wxBoxSizer(wxVERTICAL);
|
||||||
sInfoPage->Add(sbISODetails, 0, wxEXPAND|wxALL, 5);
|
sInfoPage->Add(sbISODetails, 0, wxEXPAND|wxALL, 5);
|
||||||
sInfoPage->Add(sbBannerDetails, 0, wxEXPAND|wxALL, 5);
|
sInfoPage->Add(sbBannerDetails, 0, wxEXPAND|wxALL, 5);
|
||||||
m_Information->SetSizer(sInfoPage);
|
m_Information->SetSizer(sInfoPage);
|
||||||
sInfoPage->Layout();
|
sInfoPage->Layout();
|
||||||
|
|
||||||
// Filesystem icons
|
// Filesystem icons
|
||||||
wxIcon iconTemp;
|
|
||||||
m_iconList = new wxImageList(16, 16);
|
m_iconList = new wxImageList(16, 16);
|
||||||
|
m_iconList->Add(wxBitmap(disc_xpm), wxNullBitmap); // 0
|
||||||
iconTemp.CopyFromBitmap(wxBitmap(disc_xpm)); m_iconList->Add(iconTemp); // 0
|
m_iconList->Add(wxBitmap(folder_xpm), wxNullBitmap); // 1
|
||||||
iconTemp.CopyFromBitmap(wxBitmap(folder_xpm)); m_iconList->Add(iconTemp); // 1
|
m_iconList->Add(wxBitmap(file_xpm), wxNullBitmap); // 2
|
||||||
iconTemp.CopyFromBitmap(wxBitmap(file_xpm)); m_iconList->Add(iconTemp); // 2
|
|
||||||
|
|
||||||
// Filesystem tree
|
// Filesystem tree
|
||||||
m_Treectrl = new wxTreeCtrl(m_Filesystem, ID_TREECTRL, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE, wxDefaultValidator);
|
m_Treectrl = new wxTreeCtrl(m_Filesystem, ID_TREECTRL, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE, wxDefaultValidator);
|
||||||
|
@ -509,7 +508,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sMain = new wxBoxSizer(wxVERTICAL);
|
sMain = new wxBoxSizer(wxVERTICAL);
|
||||||
sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
|
sMain->Add(m_Notebook, 1, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sButtons, 0, wxEXPAND, 5);
|
sMain->Add(sButtons, 0, wxEXPAND, 5);
|
||||||
sMain->SetMinSize(wxSize(400,500));
|
sMain->SetMinSize(wxSize(400, 600));
|
||||||
SetSizerAndFit(sMain);
|
SetSizerAndFit(sMain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -946,7 +945,7 @@ bool CISOProperties::SaveGameConfig()
|
||||||
|
|
||||||
void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event))
|
void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
if (wxFileExists(wxString::FromAscii(GameIniFile.c_str())))
|
if (wxFileExists(wxString::From8BitData(GameIniFile.c_str())))
|
||||||
{
|
{
|
||||||
SaveGameConfig();
|
SaveGameConfig();
|
||||||
|
|
||||||
|
@ -961,7 +960,7 @@ void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wxString OpenCommand;
|
wxString OpenCommand;
|
||||||
OpenCommand = filetype->GetOpenCommand(wxString::FromAscii(GameIniFile.c_str()));
|
OpenCommand = filetype->GetOpenCommand(wxString::From8BitData(GameIniFile.c_str()));
|
||||||
if(OpenCommand.IsEmpty())
|
if(OpenCommand.IsEmpty())
|
||||||
PanicAlert("Couldn't find open command for extension 'ini'!");
|
PanicAlert("Couldn't find open command for extension 'ini'!");
|
||||||
else
|
else
|
||||||
|
@ -1124,7 +1123,7 @@ void CISOProperties::ActionReplayButtonClicked(wxCommandEvent& event)
|
||||||
CARCodeAddEdit dlg(-1, this, 1, _("Add ActionReplay Code"));
|
CARCodeAddEdit dlg(-1, this, 1, _("Add ActionReplay Code"));
|
||||||
if (dlg.ShowModal() == wxID_OK)
|
if (dlg.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
Cheats->Append(wxString::FromAscii(arCodes.back().name.c_str()));
|
Cheats->Append(wxString::From8BitData(arCodes.back().name.c_str()));
|
||||||
Cheats->Check((unsigned int)(arCodes.size() - 1), arCodes.back().active);
|
Cheats->Check((unsigned int)(arCodes.size() - 1), arCodes.back().active);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1174,19 +1173,19 @@ void CISOProperties::ChangeBannerDetails(int lang)
|
||||||
wxString(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str(), *wxConvCurrent).c_str(),
|
wxString(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str(), *wxConvCurrent).c_str(),
|
||||||
name.c_str()));
|
name.c_str()));
|
||||||
}
|
}
|
||||||
else // Do the same for PAL/US Games using Ascii
|
else // Do the same for PAL/US Games (assuming ISO 8859-1)
|
||||||
{
|
{
|
||||||
wxString name = wxString::FromAscii(OpenGameListItem->GetName(lang).c_str());
|
wxString name = wxString::From8BitData(OpenGameListItem->GetName(lang).c_str());
|
||||||
|
|
||||||
m_ShortName->SetValue(name);
|
m_ShortName->SetValue(name);
|
||||||
m_Comment->SetValue(wxString::FromAscii(OpenGameListItem->GetDescription(lang).c_str()));
|
m_Comment->SetValue(wxString::From8BitData(OpenGameListItem->GetDescription(lang).c_str()));
|
||||||
m_Maker->SetValue(wxString::FromAscii(OpenGameListItem->GetCompany().c_str()));//dev too
|
m_Maker->SetValue(wxString::From8BitData(OpenGameListItem->GetCompany().c_str()));//dev too
|
||||||
|
|
||||||
std::string filename, extension;
|
std::string filename, extension;
|
||||||
SplitPath(OpenGameListItem->GetFileName(), 0, &filename, &extension);
|
SplitPath(OpenGameListItem->GetFileName(), 0, &filename, &extension);
|
||||||
|
|
||||||
SetTitle(wxString::Format(wxT("%s%s"),
|
SetTitle(wxString::Format(wxT("%s%s"),
|
||||||
wxString::FromAscii(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str()).c_str(),
|
wxString::From8BitData(StringFromFormat("%s%s: %s - ", filename.c_str(), extension.c_str(), OpenGameListItem->GetUniqueID().c_str()).c_str()).c_str(),
|
||||||
name.c_str()));
|
name.c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ bool DolphinApp::OnInit()
|
||||||
tmpChar = new char[len];
|
tmpChar = new char[len];
|
||||||
fread(tmpChar, len, 1, workingDir);
|
fread(tmpChar, len, 1, workingDir);
|
||||||
fclose(workingDir);
|
fclose(workingDir);
|
||||||
if (!wxSetWorkingDirectory(wxString::FromAscii(tmpChar)))
|
if (!wxSetWorkingDirectory(wxString::From8BitData(tmpChar)))
|
||||||
{
|
{
|
||||||
INFO_LOG(CONSOLE, "set working directory failed");
|
INFO_LOG(CONSOLE, "set working directory failed");
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,7 @@ void CMemcardManager::CreateGUIControls()
|
||||||
sPages[slot]->Add(m_NextPage[slot], 0, wxEXPAND|wxALL, 1);
|
sPages[slot]->Add(m_NextPage[slot], 0, wxEXPAND|wxALL, 1);
|
||||||
|
|
||||||
m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot,
|
m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot,
|
||||||
wxString::FromAscii(File::GetUserPath(D_GCUSER_IDX)), wxT("Choose a memory card:"),
|
wxString::From8BitData(File::GetUserPath(D_GCUSER_IDX)), wxT("Choose a memory card:"),
|
||||||
wxT("Gamecube Memory Cards (*.raw,*.gcp)|*.raw;*.gcp"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
wxT("Gamecube Memory Cards (*.raw,*.gcp)|*.raw;*.gcp"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
||||||
|
|
||||||
m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400),
|
m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400),
|
||||||
|
@ -294,7 +294,7 @@ void CMemcardManager::CreateGUIControls()
|
||||||
m_Delete[i]->Disable();
|
m_Delete[i]->Disable();
|
||||||
if (strcmp(DefaultMemcard[i].c_str(), "."))
|
if (strcmp(DefaultMemcard[i].c_str(), "."))
|
||||||
{
|
{
|
||||||
m_MemcardPath[i]->SetPath(wxString::FromAscii(DefaultMemcard[i].c_str()));
|
m_MemcardPath[i]->SetPath(wxString::From8BitData(DefaultMemcard[i].c_str()));
|
||||||
ChangePath(ID_MEMCARDPATH_A + i);
|
ChangePath(ID_MEMCARDPATH_A + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||||
case ID_SAVEIMPORT_B:
|
case ID_SAVEIMPORT_B:
|
||||||
{
|
{
|
||||||
wxString fileName = wxFileSelector(wxT("Select a save file to import"),
|
wxString fileName = wxFileSelector(wxT("Select a save file to import"),
|
||||||
(strcmp(DefaultIOPath.c_str(), "/Users/GC") == 0) ? wxString::FromAscii(""): wxString::FromAscii(DefaultIOPath.c_str()), wxEmptyString, wxEmptyString, wxString::Format
|
(strcmp(DefaultIOPath.c_str(), "/Users/GC") == 0) ? wxString::FromAscii(""): wxString::From8BitData(DefaultIOPath.c_str()), wxEmptyString, wxEmptyString, wxString::Format
|
||||||
(
|
(
|
||||||
wxT("Gamecube save files(*.gci,*.gcs,*.sav)|*.gci;*.gcs;*.sav|")
|
wxT("Gamecube save files(*.gci,*.gcs,*.sav)|*.gci;*.gcs;*.sav|")
|
||||||
wxT("Native GCI files (*.gci)|*.gci|")
|
wxT("Native GCI files (*.gci)|*.gci|")
|
||||||
|
@ -597,8 +597,8 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||||
memoryCard[slot]->DEntry_GameCode(index,tempC);
|
memoryCard[slot]->DEntry_GameCode(index,tempC);
|
||||||
memoryCard[slot]->DEntry_FileName(index,tempC2);
|
memoryCard[slot]->DEntry_FileName(index,tempC2);
|
||||||
sprintf(tempC, "%s_%s.gci", tempC, tempC2);
|
sprintf(tempC, "%s_%s.gci", tempC, tempC2);
|
||||||
wxString fileName = wxFileSelector(wxT("Export save as.."), wxString::FromAscii(DefaultIOPath.c_str()),
|
wxString fileName = wxFileSelector(wxT("Export save as.."), wxString::From8BitData(DefaultIOPath.c_str()),
|
||||||
wxString::FromAscii(tempC), wxT(".gci"), wxString::Format
|
wxString::From8BitData(tempC), wxT(".gci"), wxString::Format
|
||||||
(
|
(
|
||||||
wxT("Native GCI files (*.gci)|*.gci|")
|
wxT("Native GCI files (*.gci)|*.gci|")
|
||||||
wxT("MadCatz Gameshark files(*.gcs)|*.gcs|")
|
wxT("MadCatz Gameshark files(*.gcs)|*.gcs|")
|
||||||
|
|
|
@ -48,7 +48,7 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl*
|
||||||
|
|
||||||
std::string nickname;
|
std::string nickname;
|
||||||
netplay_section.Get("Nickname", &nickname, "Player");
|
netplay_section.Get("Nickname", &nickname, "Player");
|
||||||
m_nickname_text = new wxTextCtrl(panel, wxID_ANY, wxString::FromAscii(nickname.c_str()));
|
m_nickname_text = new wxTextCtrl(panel, wxID_ANY, wxString::From8BitData(nickname.c_str()));
|
||||||
|
|
||||||
wxBoxSizer* const nick_szr = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* const nick_szr = new wxBoxSizer(wxHORIZONTAL);
|
||||||
nick_szr->Add(nick_lbl, 0, wxCENTER);
|
nick_szr->Add(nick_lbl, 0, wxCENTER);
|
||||||
|
|
|
@ -85,13 +85,13 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
|
||||||
sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, wxString::Format(wxT("Entry 1/%d"), (int)tempEntries.size()));
|
sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, wxString::Format(wxT("Entry 1/%d"), (int)tempEntries.size()));
|
||||||
currentItem = 1;
|
currentItem = 1;
|
||||||
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
|
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
|
||||||
sgEntry->AddGrowableCol(1);
|
|
||||||
sgEntry->Add(EditPatchType, wxGBPosition(0, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EditPatchType, wxGBPosition(0, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
|
||||||
sgEntry->Add(EditPatchOffsetText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sgEntry->Add(EditPatchOffsetText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sgEntry->Add(EditPatchOffset, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EditPatchOffset, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sgEntry->Add(EditPatchValueText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
sgEntry->Add(EditPatchValueText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
sgEntry->Add(EditPatchValue, wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EditPatchValue, wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(3, 1), wxEXPAND|wxALL, 5);
|
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(3, 1), wxEXPAND|wxALL, 5);
|
||||||
|
sgEntry->AddGrowableCol(1);
|
||||||
wxBoxSizer* sEntryAddRemove = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* sEntryAddRemove = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sEntryAddRemove->Add(EntryAdd, 0, wxALL, 5);
|
sEntryAddRemove->Add(EntryAdd, 0, wxALL, 5);
|
||||||
sEntryAddRemove->Add(EntryRemove, 0, wxALL, 5);
|
sEntryAddRemove->Add(EntryRemove, 0, wxALL, 5);
|
||||||
|
|
|
@ -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_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);
|
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);
|
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 = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
||||||
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
|
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_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);
|
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);
|
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 = new wxSlider(this, ID_VOLUME, ac_Config.m_Volume, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
||||||
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
|
m_volumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
|
||||||
|
|
|
@ -140,7 +140,7 @@ void GFXConfigDialogOGL::LoadShaders()
|
||||||
std::string name = entry.children[i].virtualName.c_str();
|
std::string name = entry.children[i].virtualName.c_str();
|
||||||
if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
|
if (!strcasecmp(name.substr(name.size() - 4).c_str(), ".txt"))
|
||||||
name = name.substr(0, name.size() - 4);
|
name = name.substr(0, name.size() - 4);
|
||||||
arrayStringFor_PostShaderCB.Add(wxString::FromAscii(name.c_str()));
|
arrayStringFor_PostShaderCB.Add(wxString::From8BitData(name.c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -207,7 +207,7 @@ void GFXConfigDialogOGL::InitializeGUIValues()
|
||||||
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
|
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
|
||||||
m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode);
|
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 == _(""))
|
if (shader == _(""))
|
||||||
shader = wxT("(off)");
|
shader = wxT("(off)");
|
||||||
m_PostShaderCB->SetStringSelection(shader);
|
m_PostShaderCB->SetStringSelection(shader);
|
||||||
|
@ -548,7 +548,7 @@ void GFXConfigDialogOGL::EditShaderClick(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
if (m_PostShaderCB->GetStringSelection() == wxT("(off)"))
|
if (m_PostShaderCB->GetStringSelection() == wxT("(off)"))
|
||||||
return;
|
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))
|
if (wxFileExists(shader))
|
||||||
{
|
{
|
||||||
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("txt"));
|
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("txt"));
|
||||||
|
|
Loading…
Reference in New Issue