Kill off _T and wxT macros

Minor other alterations that relate to above as well.

Also added the PanicAlertT version of alerts for some error messages that
use PanicAlert. We want the user to actually understand why the error
occurred.
This commit is contained in:
Lioncash 2014-05-17 13:17:28 -04:00
parent 90df5efd01
commit e1359382be
41 changed files with 397 additions and 408 deletions

View File

@ -182,7 +182,7 @@ void CARCodeAddEdit::UpdateTextCtrl(ActionReplay::ARCode arCode)
if (arCode.name != "") if (arCode.name != "")
{ {
for (auto& op : arCode.ops) for (auto& op : arCode.ops)
EditCheatCode->AppendText(wxString::Format(wxT("%08X %08X\n"), op.cmd_addr, op.value)); EditCheatCode->AppendText(wxString::Format("%08X %08X\n", op.cmd_addr, op.value));
} }
else else
{ {

View File

@ -121,7 +121,7 @@ void wxCheatsWindow::Init_ChildControls()
m_CheckBox_LogAR->Bind(wxEVT_CHECKBOX, &wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange, this); m_CheckBox_LogAR->Bind(wxEVT_CHECKBOX, &wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange, this);
m_CheckBox_LogAR->SetValue(ActionReplay::IsSelfLogging()); m_CheckBox_LogAR->SetValue(ActionReplay::IsSelfLogging());
m_TextCtrl_Log = new wxTextCtrl(m_Tab_Log, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(100, -1), wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP); m_TextCtrl_Log = new wxTextCtrl(m_Tab_Log, wxID_ANY, "", wxDefaultPosition, wxSize(100, -1), wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
wxBoxSizer *HStrip1 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer *HStrip1 = new wxBoxSizer(wxHORIZONTAL);
HStrip1->Add(m_CheckBox_LogAR, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5); HStrip1->Add(m_CheckBox_LogAR, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
@ -203,11 +203,11 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent)
// Search value radio buttons // Search value radio buttons
value_x_radiobtn.rad_oldvalue = new wxRadioButton(this, -1, _("Previous Value"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); value_x_radiobtn.rad_oldvalue = new wxRadioButton(this, -1, _("Previous Value"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
value_x_radiobtn.rad_uservalue = new wxRadioButton(this, -1, wxT("")); value_x_radiobtn.rad_uservalue = new wxRadioButton(this, -1, "");
value_x_radiobtn.rad_oldvalue->SetValue(true); value_x_radiobtn.rad_oldvalue->SetValue(true);
// search value textbox // search value textbox
textctrl_value_x = new wxTextCtrl(this, -1, wxT("0x0"), wxDefaultPosition, wxSize(96,-1)); textctrl_value_x = new wxTextCtrl(this, -1, "0x0", wxDefaultPosition, wxSize(96,-1));
textctrl_value_x->Bind(wxEVT_SET_FOCUS, &CheatSearchTab::ApplyFocus, this); textctrl_value_x->Bind(wxEVT_SET_FOCUS, &CheatSearchTab::ApplyFocus, this);
wxBoxSizer* const sizer_cheat_filter_text = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* const sizer_cheat_filter_text = new wxBoxSizer(wxHORIZONTAL);
@ -539,7 +539,7 @@ void CheatSearchTab::UpdateCheatSearchResultsList()
{ {
lbox_search_results->Clear(); lbox_search_results->Clear();
wxString count_label = _("Count:") + wxString::Format(wxT(" %lu"), wxString count_label = _("Count:") + wxString::Format(" %lu",
(unsigned long)search_results.size()); (unsigned long)search_results.size());
if (search_results.size() > MAX_CHEAT_SEARCH_RESULTS_DISPLAY) if (search_results.size() > MAX_CHEAT_SEARCH_RESULTS_DISPLAY)
{ {
@ -566,12 +566,10 @@ void CheatSearchTab::UpdateCheatSearchResultsList()
// #elseif BIG_ENDIAN // #elseif BIG_ENDIAN
// need to do some stuff in here (for 8 and 16bit) for bigendian // need to do some stuff in here (for 8 and 16bit) for bigendian
// #endif // #endif
std::string rowfmt = StringFromFormat("0x%%08x 0x%%0%ux %%u/%%i", search_type_size*2);
static wxChar rowfmt[] = wxT("0x%08x 0x%0|x %u/%i");
rowfmt[14] = (wxChar)(wxT('0') + search_type_size*2);
lbox_search_results->Append( lbox_search_results->Append(
wxString::Format(rowfmt, result.address, display_value, display_value, display_value)); wxString::Format(rowfmt.c_str(), result.address, display_value, display_value, display_value));
} }
} }
@ -598,11 +596,11 @@ CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address)
textctrl_name = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxSize(256,-1)); textctrl_name = new wxTextCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxSize(256,-1));
wxStaticText* const label_code = new wxStaticText(this, -1, _("Code: ")); wxStaticText* const label_code = new wxStaticText(this, -1, _("Code: "));
textctrl_code = new wxTextCtrl(this, -1, wxString::Format(wxT("0x%08x"), address)); textctrl_code = new wxTextCtrl(this, -1, wxString::Format("0x%08x", address));
textctrl_code->Disable(); textctrl_code->Disable();
wxStaticText* const label_value = new wxStaticText(this, -1, _("Value: ")); wxStaticText* const label_value = new wxStaticText(this, -1, _("Value: "));
textctrl_value = new wxTextCtrl(this, -1, wxT("0")); textctrl_value = new wxTextCtrl(this, -1, "0");
checkbox_use_hex = new wxCheckBox(this, -1, _("Use Hex")); checkbox_use_hex = new wxCheckBox(this, -1, _("Use Hex"));
checkbox_use_hex->SetValue(true); checkbox_use_hex->SetValue(true);
@ -647,8 +645,8 @@ void CreateCodeDialog::PressOK(wxCommandEvent& ev)
} }
//wxString full_code = textctrl_code->GetValue(); //wxString full_code = textctrl_code->GetValue();
//full_code += wxT(' '); //full_code += ' ';
//full_code += wxString::Format(wxT("0x%08x"), code_value); //full_code += wxString::Format("0x%08x", code_value);
// create the new code // create the new code
ActionReplay::ARCode new_cheat; ActionReplay::ARCode new_cheat;

View File

@ -121,7 +121,6 @@ static const wxLanguage langIds[] =
#define EXIDEV_AM_BB_STR _trans("AM-Baseboard") #define EXIDEV_AM_BB_STR _trans("AM-Baseboard")
#define EXIDEV_GECKO_STR "USBGecko" #define EXIDEV_GECKO_STR "USBGecko"
#define WXSTR_TRANS(a) wxString(wxGetTranslation(wxT(a)))
#ifdef WIN32 #ifdef WIN32
//only used with xgettext to be picked up as translatable string. //only used with xgettext to be picked up as translatable string.
//win32 does not have wx on its path, the provided wxALL_FILES //win32 does not have wx on its path, the provided wxALL_FILES
@ -268,7 +267,7 @@ void CConfigMain::InitializeGUILists()
arrayStringFor_Framelimit.Add(_("Auto")); arrayStringFor_Framelimit.Add(_("Auto"));
arrayStringFor_Framelimit.Add(_("Audio")); arrayStringFor_Framelimit.Add(_("Audio"));
for (int i = 10; i <= 120; i += 5) // from 10 to 120 for (int i = 10; i <= 120; i += 5) // from 10 to 120
arrayStringFor_Framelimit.Add(wxString::Format(wxT("%i"), i)); arrayStringFor_Framelimit.Add(wxString::Format("%i", i));
// Emulator Engine // Emulator Engine
for (const CPUCore& CPUCores_a : CPUCores) for (const CPUCore& CPUCores_a : CPUCores)
@ -295,8 +294,8 @@ void CConfigMain::InitializeGUILists()
arrayStringFor_WiiSensBarPos.Add(_("Top")); arrayStringFor_WiiSensBarPos.Add(_("Top"));
// Aspect ratio // Aspect ratio
arrayStringFor_WiiAspectRatio.Add(wxT("4:3")); arrayStringFor_WiiAspectRatio.Add("4:3");
arrayStringFor_WiiAspectRatio.Add(wxT("16:9")); arrayStringFor_WiiAspectRatio.Add("16:9");
// Wii Language arrayStrings // Wii Language arrayStrings
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang; arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
@ -375,7 +374,7 @@ void CConfigMain::InitializeGUIValues()
// Audio // Audio
VolumeSlider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend)); VolumeSlider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend));
VolumeSlider->SetValue(SConfig::GetInstance().m_Volume); VolumeSlider->SetValue(SConfig::GetInstance().m_Volume);
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), SConfig::GetInstance().m_Volume)); VolumeText->SetLabel(wxString::Format("%d %%", SConfig::GetInstance().m_Volume));
DSPThread->SetValue(startup_params.bDSPThread); DSPThread->SetValue(startup_params.bDSPThread);
DumpAudio->SetValue(SConfig::GetInstance().m_DumpAudio ? true : false); DumpAudio->SetValue(SConfig::GetInstance().m_DumpAudio ? true : false);
DPL2Decoder->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL); DPL2Decoder->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL);
@ -658,7 +657,7 @@ void CConfigMain::CreateGUIControls()
DumpAudio = new wxCheckBox(AudioPage, ID_DUMP_AUDIO, _("Dump Audio")); DumpAudio = new wxCheckBox(AudioPage, ID_DUMP_AUDIO, _("Dump Audio"));
DPL2Decoder = new wxCheckBox(AudioPage, ID_DPL2DECODER, _("Dolby Pro Logic II decoder")); DPL2Decoder = new wxCheckBox(AudioPage, ID_DPL2DECODER, _("Dolby Pro Logic II decoder"));
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE); VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 1, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
VolumeText = new wxStaticText(AudioPage, wxID_ANY, wxT("")); VolumeText = new wxStaticText(AudioPage, wxID_ANY, "");
BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString); BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
Latency = new wxSpinCtrl(AudioPage, ID_LATENCY, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 30); Latency = new wxSpinCtrl(AudioPage, ID_LATENCY, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 30);
@ -709,13 +708,13 @@ void CConfigMain::CreateGUIControls()
wxStaticText* GCEXIDeviceText[3]; wxStaticText* GCEXIDeviceText[3];
GCEXIDeviceText[0] = TEXT_BOX(GamecubePage, _("Slot A")); GCEXIDeviceText[0] = TEXT_BOX(GamecubePage, _("Slot A"));
GCEXIDeviceText[1] = TEXT_BOX(GamecubePage, _("Slot B")); GCEXIDeviceText[1] = TEXT_BOX(GamecubePage, _("Slot B"));
GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, wxT("SP1")); GCEXIDeviceText[2] = TEXT_BOX(GamecubePage, "SP1");
GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA); GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA);
GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB); GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB);
GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1); GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1);
GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, wxT("..."), GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, "...",
wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, wxT("..."), GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, "...",
wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
//SI Devices //SI Devices
@ -810,11 +809,11 @@ void CConfigMain::CreateGUIControls()
RemoveISOPath->Enable(false); RemoveISOPath->Enable(false);
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"), DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"),
_("All GC/Wii images (gcm, iso, wbfs, ciso, gcz)") + wxString::Format(wxT("|*.gcm;*.iso;*.wbfs;*.ciso;*.gcz|%s"), wxGetTranslation(wxALL_FILES)), _("All GC/Wii images (gcm, iso, wbfs, ciso, gcz)") + wxString::Format("|*.gcm;*.iso;*.wbfs;*.ciso;*.gcz|%s", wxGetTranslation(wxALL_FILES)),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL); DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"), ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"),
_("apploader (.img)") + wxString::Format(wxT("|*.img|%s"), wxGetTranslation(wxALL_FILES)), _("apploader (.img)") + wxString::Format("|*.img|%s", wxGetTranslation(wxALL_FILES)),
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
NANDRoot = new wxDirPickerCtrl(PathsPage, ID_NANDROOT, wxEmptyString, _("Choose a NAND root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL); NANDRoot = new wxDirPickerCtrl(PathsPage, ID_NANDROOT, wxEmptyString, _("Choose a NAND root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
@ -954,7 +953,7 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
case ID_VOLUME: case ID_VOLUME:
SConfig::GetInstance().m_Volume = VolumeSlider->GetValue(); SConfig::GetInstance().m_Volume = VolumeSlider->GetValue();
AudioCommon::UpdateSoundStream(); AudioCommon::UpdateSoundStream();
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), VolumeSlider->GetValue())); VolumeText->SetLabel(wxString::Format("%d %%", VolumeSlider->GetValue()));
break; break;
case ID_DSPTHREAD: case ID_DSPTHREAD:
@ -1056,9 +1055,9 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
std::string filename = WxStrToStr(wxFileSelector( std::string filename = WxStrToStr(wxFileSelector(
_("Choose a file to open"), _("Choose a file to open"),
StrToWxStr(File::GetUserPath(D_GCUSER_IDX)), StrToWxStr(File::GetUserPath(D_GCUSER_IDX)),
isSlotA ? wxT(GC_MEMCARDA) : wxT(GC_MEMCARDB), isSlotA ? GC_MEMCARDA : GC_MEMCARDB,
wxEmptyString, wxEmptyString,
_("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp")))); _("Gamecube Memory Cards (*.raw,*.gcp)") + "|*.raw;*.gcp"));
if (!filename.empty()) if (!filename.empty())
{ {
@ -1112,17 +1111,17 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
void CConfigMain::ChooseSIDevice(wxString deviceName, int deviceNum) void CConfigMain::ChooseSIDevice(wxString deviceName, int deviceNum)
{ {
SIDevices tempType; SIDevices tempType;
if (!deviceName.compare(WXSTR_TRANS(SIDEV_STDCONT_STR))) if (!deviceName.compare(_(SIDEV_STDCONT_STR)))
tempType = SIDEVICE_GC_CONTROLLER; tempType = SIDEVICE_GC_CONTROLLER;
else if (!deviceName.compare(WXSTR_TRANS(SIDEV_STEERING_STR))) else if (!deviceName.compare(_(SIDEV_STEERING_STR)))
tempType = SIDEVICE_GC_STEERING; tempType = SIDEVICE_GC_STEERING;
else if (!deviceName.compare(WXSTR_TRANS(SIDEV_DANCEMAT_STR))) else if (!deviceName.compare(_(SIDEV_DANCEMAT_STR)))
tempType = SIDEVICE_DANCEMAT; tempType = SIDEVICE_DANCEMAT;
else if (!deviceName.compare(WXSTR_TRANS(SIDEV_BONGO_STR))) else if (!deviceName.compare(_(SIDEV_BONGO_STR)))
tempType = SIDEVICE_GC_TARUKONGA; tempType = SIDEVICE_GC_TARUKONGA;
else if (!deviceName.compare(wxT(SIDEV_GBA_STR))) else if (!deviceName.compare(SIDEV_GBA_STR))
tempType = SIDEVICE_GC_GBA; tempType = SIDEVICE_GC_GBA;
else if (!deviceName.compare(WXSTR_TRANS(SIDEV_AM_BB_STR))) else if (!deviceName.compare(_(SIDEV_AM_BB_STR)))
tempType = SIDEVICE_AM_BASEBOARD; tempType = SIDEVICE_AM_BASEBOARD;
else else
tempType = SIDEVICE_NONE; tempType = SIDEVICE_NONE;
@ -1140,17 +1139,17 @@ void CConfigMain::ChooseEXIDevice(wxString deviceName, int deviceNum)
{ {
TEXIDevices tempType; TEXIDevices tempType;
if (!deviceName.compare(WXSTR_TRANS(EXIDEV_MEMCARD_STR))) if (!deviceName.compare(_(EXIDEV_MEMCARD_STR)))
tempType = EXIDEVICE_MEMORYCARD; tempType = EXIDEVICE_MEMORYCARD;
else if (!deviceName.compare(WXSTR_TRANS(EXIDEV_MIC_STR))) else if (!deviceName.compare(_(EXIDEV_MIC_STR)))
tempType = EXIDEVICE_MIC; tempType = EXIDEVICE_MIC;
else if (!deviceName.compare(wxT(EXIDEV_BBA_STR))) else if (!deviceName.compare(EXIDEV_BBA_STR))
tempType = EXIDEVICE_ETH; tempType = EXIDEVICE_ETH;
else if (!deviceName.compare(WXSTR_TRANS(EXIDEV_AM_BB_STR))) else if (!deviceName.compare(_(EXIDEV_AM_BB_STR)))
tempType = EXIDEVICE_AM_BASEBOARD; tempType = EXIDEVICE_AM_BASEBOARD;
else if (!deviceName.compare(wxT(EXIDEV_GECKO_STR))) else if (!deviceName.compare(EXIDEV_GECKO_STR))
tempType = EXIDEVICE_GECKO; tempType = EXIDEVICE_GECKO;
else if (!deviceName.compare(WXSTR_TRANS(DEV_NONE_STR))) else if (!deviceName.compare(_(DEV_NONE_STR)))
tempType = EXIDEVICE_NONE; tempType = EXIDEVICE_NONE;
else else
tempType = EXIDEVICE_DUMMY; tempType = EXIDEVICE_DUMMY;
@ -1199,7 +1198,7 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
u8 country_code = GetSADRCountryCode(wii_system_lang); u8 country_code = GetSADRCountryCode(wii_system_lang);
if (!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1)) if (!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1))
{ {
PanicAlert("Failed to update country code in SYSCONF"); PanicAlertT("Failed to update country code in SYSCONF");
} }
break; break;
} }

View File

@ -25,10 +25,10 @@ BEGIN_EVENT_TABLE(BreakPointDlg, wxDialog)
END_EVENT_TABLE() END_EVENT_TABLE()
BreakPointDlg::BreakPointDlg(CBreakPointWindow *_Parent) BreakPointDlg::BreakPointDlg(CBreakPointWindow *_Parent)
: wxDialog(_Parent, wxID_ANY, wxT("BreakPoint")) : wxDialog(_Parent, wxID_ANY, _("Add Breakpoint"))
, Parent(_Parent) , Parent(_Parent)
{ {
m_pEditAddress = new wxTextCtrl(this, wxID_ANY, wxT("80000000")); m_pEditAddress = new wxTextCtrl(this, wxID_ANY, "80000000");
wxBoxSizer *sMainSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *sMainSizer = new wxBoxSizer(wxVERTICAL);
sMainSizer->Add(m_pEditAddress, 0, wxEXPAND | wxALL, 5); sMainSizer->Add(m_pEditAddress, 0, wxEXPAND | wxALL, 5);
@ -50,7 +50,7 @@ void BreakPointDlg::OnOK(wxCommandEvent& event)
} }
else else
{ {
PanicAlert("The address %s is invalid.", WxStrToStr(AddressString).c_str()); PanicAlertT("The address %s is invalid.", WxStrToStr(AddressString).c_str());
} }
event.Skip(); event.Skip();

View File

@ -36,11 +36,11 @@ void CBreakPointView::Update()
{ {
ClearAll(); ClearAll();
InsertColumn(0, wxT("Active")); InsertColumn(0, _("Active"));
InsertColumn(1, wxT("Type")); InsertColumn(1, _("Type"));
InsertColumn(2, wxT("Function")); InsertColumn(2, _("Function"));
InsertColumn(3, wxT("Address")); InsertColumn(3, _("Address"));
InsertColumn(4, wxT("Flags")); InsertColumn(4, _("Flags"));
char szBuffer[64]; char szBuffer[64];
const BreakPoints::TBreakPoints& rBreakPoints = PowerPC::breakpoints.GetBreakPoints(); const BreakPoints::TBreakPoints& rBreakPoints = PowerPC::breakpoints.GetBreakPoints();

View File

@ -49,26 +49,26 @@ public:
m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(24, 24)); m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(24, 24));
m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24)); m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24));
AddTool(ID_DELETE, wxT("Delete"), m_Bitmaps[Toolbar_Delete]); AddTool(ID_DELETE, _("Delete"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE); Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE);
AddTool(ID_CLEAR, wxT("Clear"), m_Bitmaps[Toolbar_Delete]); AddTool(ID_CLEAR, _("Clear"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::OnClear, parent, ID_CLEAR); Bind(wxEVT_TOOL, &CBreakPointWindow::OnClear, parent, ID_CLEAR);
AddTool(ID_ADDBP, wxT("+BP"), m_Bitmaps[Toolbar_Add_BP]); AddTool(ID_ADDBP, "+BP", m_Bitmaps[Toolbar_Add_BP]);
Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddBreakPoint, parent, ID_ADDBP); Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddBreakPoint, parent, ID_ADDBP);
// Add memory breakpoints if you can use them // Add memory breakpoints if you can use them
if (Memory::AreMemoryBreakpointsActivated()) if (Memory::AreMemoryBreakpointsActivated())
{ {
AddTool(ID_ADDMC, wxT("+MC"), m_Bitmaps[Toolbar_Add_MC]); AddTool(ID_ADDMC, "+MC", m_Bitmaps[Toolbar_Add_MC]);
Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddMemoryCheck, parent, ID_ADDMC); Bind(wxEVT_TOOL, &CBreakPointWindow::OnAddMemoryCheck, parent, ID_ADDMC);
} }
AddTool(ID_LOAD, wxT("Load"), m_Bitmaps[Toolbar_Delete]); AddTool(ID_LOAD, _("Load"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::LoadAll, parent, ID_LOAD); Bind(wxEVT_TOOL, &CBreakPointWindow::LoadAll, parent, ID_LOAD);
AddTool(ID_SAVE, wxT("Save"), m_Bitmaps[Toolbar_Delete]); AddTool(ID_SAVE, _("Save"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::Event_SaveAll, parent, ID_SAVE); Bind(wxEVT_TOOL, &CBreakPointWindow::Event_SaveAll, parent, ID_SAVE);
} }

View File

@ -25,7 +25,7 @@ public:
CBreakPointWindow(CCodeWindow* _pCodeWindow, CBreakPointWindow(CCodeWindow* _pCodeWindow,
wxWindow* parent, wxWindow* parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
const wxString& title = wxT("Breakpoints"), const wxString& title = _("Breakpoints"),
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxBORDER_NONE); long style = wxTAB_TRAVERSAL | wxBORDER_NONE);

View File

@ -227,7 +227,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
case IDM_COPYADDRESS: case IDM_COPYADDRESS:
wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%08x"), selection))); wxTheClipboard->SetData(new wxTextDataObject(wxString::Format("%08x", selection)));
break; break;
case IDM_COPYCODE: case IDM_COPYCODE:
@ -310,7 +310,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
Symbol *symbol = symbol_db->GetSymbolFromAddr(selection); Symbol *symbol = symbol_db->GetSymbolFromAddr(selection);
if (symbol) if (symbol)
{ {
wxTextEntryDialog input_symbol(this, StrToWxStr("Rename symbol:"), wxTextEntryDialog input_symbol(this, _("Rename symbol:"),
wxGetTextFromUserPromptStr, wxGetTextFromUserPromptStr,
StrToWxStr(symbol->name)); StrToWxStr(symbol->name));
if (input_symbol.ShowModal() == wxID_OK) if (input_symbol.ShowModal() == wxID_OK)
@ -339,24 +339,23 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event)
// popup menu // popup menu
wxMenu* menu = new wxMenu; wxMenu* menu = new wxMenu;
//menu->Append(IDM_GOTOINMEMVIEW, "&Goto in mem view"); //menu->Append(IDM_GOTOINMEMVIEW, "&Goto in mem view");
menu->Append(IDM_FOLLOWBRANCH, menu->Append(IDM_FOLLOWBRANCH, _("&Follow branch"))->Enable(AddrToBranch(selection) ? true : false);
StrToWxStr("&Follow branch"))->Enable(AddrToBranch(selection) ? true : false);
menu->AppendSeparator(); menu->AppendSeparator();
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
menu->Append(IDM_COPYADDRESS, StrToWxStr("Copy &address")); menu->Append(IDM_COPYADDRESS, _("Copy &address"));
menu->Append(IDM_COPYFUNCTION, StrToWxStr("Copy &function"))->Enable(isSymbol); menu->Append(IDM_COPYFUNCTION, _("Copy &function"))->Enable(isSymbol);
menu->Append(IDM_COPYCODE, StrToWxStr("Copy &code line")); menu->Append(IDM_COPYCODE, _("Copy &code line"));
menu->Append(IDM_COPYHEX, StrToWxStr("Copy &hex")); menu->Append(IDM_COPYHEX, _("Copy &hex"));
menu->AppendSeparator(); menu->AppendSeparator();
#endif #endif
menu->Append(IDM_RENAMESYMBOL, StrToWxStr("Rename &symbol"))->Enable(isSymbol); menu->Append(IDM_RENAMESYMBOL, _("Rename &symbol"))->Enable(isSymbol);
menu->AppendSeparator(); menu->AppendSeparator();
menu->Append(IDM_RUNTOHERE, _("&Run To Here")); menu->Append(IDM_RUNTOHERE, _("&Run To Here"));
menu->Append(IDM_ADDFUNCTION, _("&Add function")); menu->Append(IDM_ADDFUNCTION, _("&Add function"));
menu->Append(IDM_JITRESULTS, StrToWxStr("PPC vs X86")); menu->Append(IDM_JITRESULTS, _("PPC vs X86"));
menu->Append(IDM_INSERTBLR, StrToWxStr("Insert &blr")); menu->Append(IDM_INSERTBLR, _("Insert &blr"));
menu->Append(IDM_INSERTNOP, StrToWxStr("Insert &nop")); menu->Append(IDM_INSERTNOP, _("Insert &nop"));
menu->Append(IDM_PATCHALERT, StrToWxStr("Patch alert")); menu->Append(IDM_PATCHALERT, _("Patch alert"));
PopupMenu(menu); PopupMenu(menu);
event.Skip(true); event.Skip(true);
} }
@ -375,12 +374,12 @@ void CCodeView::OnPaint(wxPaintEvent& event)
dc.SetFont(DebuggerFont); dc.SetFont(DebuggerFont);
wxCoord w,h; wxCoord w,h;
dc.GetTextExtent(_T("0WJyq"),&w,&h); dc.GetTextExtent("0WJyq", &w, &h);
if (h > rowHeight) if (h > rowHeight)
rowHeight = h; rowHeight = h;
dc.GetTextExtent(_T("W"),&w,&h); dc.GetTextExtent("W", &w, &h);
int charWidth = w; int charWidth = w;
struct branch struct branch
@ -399,15 +398,15 @@ void CCodeView::OnPaint(wxPaintEvent& event)
// Colors and brushes // Colors and brushes
// ------------------------- // -------------------------
dc.SetBackgroundMode(wxTRANSPARENT); // the text background dc.SetBackgroundMode(wxTRANSPARENT); // the text background
const wxChar* bgColor = _T("#ffffff"); const wxColour bgColor = *wxWHITE;
wxPen nullPen(bgColor); wxPen nullPen(bgColor);
wxPen currentPen(_T("#000000")); wxPen currentPen(*wxBLACK_PEN);
wxPen selPen(_T("#808080")); // gray wxPen selPen(*wxGREY_PEN);
nullPen.SetStyle(wxTRANSPARENT); nullPen.SetStyle(wxTRANSPARENT);
currentPen.SetStyle(wxSOLID); currentPen.SetStyle(wxSOLID);
wxBrush currentBrush(_T("#FFEfE8")); // light gray wxBrush currentBrush(*wxLIGHT_GREY_BRUSH);
wxBrush pcBrush(_T("#70FF70")); // green wxBrush pcBrush(*wxGREEN_BRUSH);
wxBrush bpBrush(_T("#FF3311")); // red wxBrush bpBrush(*wxRED_BRUSH);
wxBrush bgBrush(bgColor); wxBrush bgBrush(bgColor);
wxBrush nullBrush(bgColor); wxBrush nullBrush(bgColor);
@ -429,9 +428,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
int rowY1 = rc.height / 2 + rowHeight * i - rowHeight / 2; int rowY1 = rc.height / 2 + rowHeight * i - rowHeight / 2;
int rowY2 = rc.height / 2 + rowHeight * i + rowHeight / 2; int rowY2 = rc.height / 2 + rowHeight * i + rowHeight / 2;
wxString temp = wxString::Format(_T("%08x"), address); wxString temp = wxString::Format("%08x", address);
u32 col = debugger->GetColor(address); u32 col = debugger->GetColor(address);
wxBrush rowBrush(wxColor(col >> 16, col >> 8, col)); wxBrush rowBrush(wxColour(col >> 16, col >> 8, col));
dc.SetBrush(nullBrush); dc.SetBrush(nullBrush);
dc.SetPen(nullPen); dc.SetPen(nullPen);
dc.DrawRectangle(0, rowY1, 16, rowY2 - rowY1 + 2); dc.DrawRectangle(0, rowY1, 16, rowY2 - rowY1 + 2);
@ -450,9 +449,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
dc.SetBrush(currentBrush); dc.SetBrush(currentBrush);
if (!plain) if (!plain)
{ {
dc.SetTextForeground(_T("#600000")); // the address text is dark red dc.SetTextForeground("#600000"); // the address text is dark red
dc.DrawText(temp, 17, rowY1); dc.DrawText(temp, 17, rowY1);
dc.SetTextForeground(_T("#000000")); dc.SetTextForeground(*wxBLACK);
} }
// If running // If running
@ -495,11 +494,11 @@ void CCodeView::OnPaint(wxPaintEvent& event)
branches[numBranches].srcAddr = address / align; branches[numBranches].srcAddr = address / align;
branches[numBranches++].dst = (int)(rowY1 + ((s64)(u32)offs - (s64)(u32)address) * rowHeight / align + rowHeight / 2); branches[numBranches++].dst = (int)(rowY1 + ((s64)(u32)offs - (s64)(u32)address) * rowHeight / align + rowHeight / 2);
sprintf(desc, "-->%s", debugger->GetDescription(offs).c_str()); sprintf(desc, "-->%s", debugger->GetDescription(offs).c_str());
dc.SetTextForeground(_T("#600060")); // the -> arrow illustrations are purple dc.SetTextForeground(wxTheColourDatabase->Find("PURPLE")); // the -> arrow illustrations are purple
} }
else else
{ {
dc.SetTextForeground(_T("#000000")); dc.SetTextForeground(*wxBLACK);
} }
dc.DrawText(StrToWxStr(dis2), 17 + 17*charWidth, rowY1); dc.DrawText(StrToWxStr(dis2), 17 + 17*charWidth, rowY1);
@ -508,9 +507,9 @@ void CCodeView::OnPaint(wxPaintEvent& event)
// Show blr as its' own color // Show blr as its' own color
if (strcmp(dis, "blr")) if (strcmp(dis, "blr"))
dc.SetTextForeground(_T("#007000")); // dark green dc.SetTextForeground(wxTheColourDatabase->Find("DARK GREEN"));
else else
dc.SetTextForeground(_T("#8000FF")); // purple dc.SetTextForeground(wxTheColourDatabase->Find("VIOLET"));
dc.DrawText(StrToWxStr(dis), 17 + (plain ? 1*charWidth : 9*charWidth), rowY1); dc.DrawText(StrToWxStr(dis), 17 + (plain ? 1*charWidth : 9*charWidth), rowY1);
@ -521,7 +520,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
if (!plain) if (!plain)
{ {
dc.SetTextForeground(_T("#0000FF")); // blue dc.SetTextForeground(*wxBLUE);
//char temp[256]; //char temp[256];
//UnDecorateSymbolName(desc,temp,255,UNDNAME_COMPLETE); //UnDecorateSymbolName(desc,temp,255,UNDNAME_COMPLETE);

View File

@ -365,7 +365,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
wxMenu* pCoreMenu = new wxMenu; wxMenu* pCoreMenu = new wxMenu;
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _("&Interpreter core"), wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _("&Interpreter core"),
StrToWxStr("This is necessary to get break points" _("This is necessary to get break points"
" and stepping to work as explained in the Developer Documentation. But it can be very" " and stepping to work as explained in the Developer Documentation. But it can be very"
" slow, perhaps slower than 1 fps."), " slow, perhaps slower than 1 fps."),
wxITEM_CHECK); wxITEM_CHECK);
@ -433,7 +433,7 @@ void CCodeWindow::CreateMenuOptions(wxMenu* pMenu)
boottopause->Check(bBootToPause); boottopause->Check(bBootToPause);
wxMenuItem* automaticstart = pMenu->Append(IDM_AUTOMATICSTART, _("&Automatic start"), wxMenuItem* automaticstart = pMenu->Append(IDM_AUTOMATICSTART, _("&Automatic start"),
StrToWxStr( _(
"Automatically load the Default ISO when Dolphin starts, or the last game you loaded," "Automatically load the Default ISO when Dolphin starts, or the last game you loaded,"
" if you have not given it an elf file with the --elf command line. [This can be" " if you have not given it an elf file with the --elf command line. [This can be"
" convenient if you are bug-testing with a certain game and want to rebuild" " convenient if you are bug-testing with a certain game and want to rebuild"
@ -442,7 +442,7 @@ void CCodeWindow::CreateMenuOptions(wxMenu* pMenu)
wxITEM_CHECK); wxITEM_CHECK);
automaticstart->Check(bAutomaticStart); automaticstart->Check(bAutomaticStart);
pMenu->Append(IDM_FONTPICKER, _("&Font..."), wxEmptyString, wxITEM_NORMAL); pMenu->Append(IDM_FONTPICKER, _("&Font..."));
} }
// CPU Mode and JIT Menu // CPU Mode and JIT Menu
@ -515,8 +515,7 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event)
case IDM_SEARCHINSTRUCTION: case IDM_SEARCHINSTRUCTION:
{ {
wxString str; wxString str = wxGetTextFromUser("", _("Op?"), wxEmptyString, this);
str = wxGetTextFromUser(_T(""), wxT("Op?"), wxEmptyString, this);
for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4) for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4)
{ {
const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr)); const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr));
@ -585,7 +584,7 @@ void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar)
toolBar->AddTool(IDM_GOTOPC, _("Show PC"), m_Bitmaps[Toolbar_GotoPC]); toolBar->AddTool(IDM_GOTOPC, _("Show PC"), m_Bitmaps[Toolbar_GotoPC]);
toolBar->AddTool(IDM_SETPC, _("Set PC"), m_Bitmaps[Toolbar_SetPC]); toolBar->AddTool(IDM_SETPC, _("Set PC"), m_Bitmaps[Toolbar_SetPC]);
toolBar->AddSeparator(); toolBar->AddSeparator();
toolBar->AddControl(new wxTextCtrl(toolBar, IDM_ADDRBOX, _T(""))); toolBar->AddControl(new wxTextCtrl(toolBar, IDM_ADDRBOX, ""));
toolBar->Realize(); toolBar->Realize();
} }

View File

@ -152,7 +152,7 @@ void CCodeWindow::CreateMenuSymbols(wxMenuBar *pMenuBar)
pSymbolsMenu->Append(IDM_SAVEMAPFILE, _("&Save symbol map")); pSymbolsMenu->Append(IDM_SAVEMAPFILE, _("&Save symbol map"));
pSymbolsMenu->AppendSeparator(); pSymbolsMenu->AppendSeparator();
pSymbolsMenu->Append(IDM_SAVEMAPFILEWITHCODES, _("Save code"), pSymbolsMenu->Append(IDM_SAVEMAPFILEWITHCODES, _("Save code"),
StrToWxStr("Save the entire disassembled code. This may take a several seconds" _("Save the entire disassembled code. This may take a several seconds"
" and may require between 50 and 100 MB of hard drive space. It will only save code" " and may require between 50 and 100 MB of hard drive space. It will only save code"
" that are in the first 4 MB of memory, if you are debugging a game that load .rel" " that are in the first 4 MB of memory, if you are debugging a game that load .rel"
" files with code to memory you may want to increase that to perhaps 8 MB, you can do" " files with code to memory you may want to increase that to perhaps 8 MB, you can do"
@ -198,10 +198,10 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
Profiler::WriteProfileResults(filename); Profiler::WriteProfileResults(filename);
wxFileType* filetype = nullptr; wxFileType* filetype = nullptr;
if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt")))) if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension("txt")))
{ {
// From extension failed, trying with MIME type now // From extension failed, trying with MIME type now
if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain")))) if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain")))
// MIME type failed, aborting mission // MIME type failed, aborting mission
break; break;
} }
@ -227,7 +227,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
switch (event.GetId()) switch (event.GetId())
{ {
case IDM_CLEARSYMBOLS: case IDM_CLEARSYMBOLS:
if (!AskYesNo("Do you want to clear the list of symbol names?")) return; if (!AskYesNoT("Do you want to clear the list of symbol names?")) return;
g_symbolDB.Clear(); g_symbolDB.Clear();
Host_NotifyMapLoaded(); Host_NotifyMapLoaded();
break; break;
@ -279,7 +279,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
const wxString path = wxFileSelector( const wxString path = wxFileSelector(
_("Apply signature file"), wxEmptyString, _("Apply signature file"), wxEmptyString,
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Symbol Rename File (*.sym)|*.sym"), "Dolphin Symbol Rename File (*.sym)|*.sym",
wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
if (!path.IsEmpty()) if (!path.IsEmpty())
@ -313,7 +313,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
{ {
wxTextEntryDialog input_prefix( wxTextEntryDialog input_prefix(
this, this,
StrToWxStr("Only export symbols with prefix:\n(Blank for all symbols)"), _("Only export symbols with prefix:\n(Blank for all symbols)"),
wxGetTextFromUserPromptStr, wxGetTextFromUserPromptStr,
wxEmptyString); wxEmptyString);
@ -322,8 +322,8 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
std::string prefix(WxStrToStr(input_prefix.GetValue())); std::string prefix(WxStrToStr(input_prefix.GetValue()));
wxString path = wxFileSelector( wxString path = wxFileSelector(
_T("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString, _("Save signature as"), wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_SAVE, "Dolphin Signature File (*.dsy)|*.dsy;", wxFD_SAVE,
this); this);
if (!path.IsEmpty()) if (!path.IsEmpty())
{ {
@ -337,8 +337,8 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
case IDM_USESIGNATUREFILE: case IDM_USESIGNATUREFILE:
{ {
wxString path = wxFileSelector( wxString path = wxFileSelector(
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, _("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Signature File (*.dsy)|*.dsy;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, "Dolphin Signature File (*.dsy)|*.dsy;", wxFD_OPEN | wxFD_FILE_MUST_EXIST,
this); this);
if (!path.IsEmpty()) if (!path.IsEmpty())
{ {

View File

@ -57,11 +57,11 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
m_Toolbar = new wxAuiToolBar(this, ID_TOOLBAR, m_Toolbar = new wxAuiToolBar(this, ID_TOOLBAR,
wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_TEXT); wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_TEXT);
m_Toolbar->AddTool(ID_RUNTOOL, wxT("Pause"), m_Toolbar->AddTool(ID_RUNTOOL, _("Pause"),
wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10,10))); wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10,10)));
m_Toolbar->AddTool(ID_STEPTOOL, wxT("Step"), m_Toolbar->AddTool(ID_STEPTOOL, _("Step"),
wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_OTHER, wxSize(10,10))); wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_OTHER, wxSize(10,10)));
m_Toolbar->AddTool(ID_SHOWPCTOOL, wxT("Show PC"), m_Toolbar->AddTool(ID_SHOWPCTOOL, _("Show PC"),
wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_OTHER, wxSize(10,10))); wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_OTHER, wxSize(10,10)));
m_Toolbar->AddSeparator(); m_Toolbar->AddSeparator();
m_Toolbar->AddControl(new wxTextCtrl(m_Toolbar, ID_ADDRBOX, wxEmptyString, m_Toolbar->AddControl(new wxTextCtrl(m_Toolbar, ID_ADDRBOX, wxEmptyString,
@ -81,7 +81,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
m_CodeView->SetPlain(); m_CodeView->SetPlain();
code_sizer->Add(m_CodeView, 1, wxALL | wxEXPAND); code_sizer->Add(m_CodeView, 1, wxALL | wxEXPAND);
code_panel->SetSizer(code_sizer); code_panel->SetSizer(code_sizer);
m_MainNotebook->AddPage(code_panel, wxT("Disasm"), true); m_MainNotebook->AddPage(code_panel, _("Disassembly"), true);
wxPanel *mem_panel = new wxPanel(m_MainNotebook, wxID_ANY); wxPanel *mem_panel = new wxPanel(m_MainNotebook, wxID_ANY);
wxBoxSizer *mem_sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *mem_sizer = new wxBoxSizer(wxVERTICAL);
@ -89,7 +89,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
m_MemView = new CMemoryView(&debug_interface, mem_panel); m_MemView = new CMemoryView(&debug_interface, mem_panel);
mem_sizer->Add(m_MemView, 1, wxALL | wxEXPAND); mem_sizer->Add(m_MemView, 1, wxALL | wxEXPAND);
mem_panel->SetSizer(mem_sizer); mem_panel->SetSizer(mem_sizer);
m_MainNotebook->AddPage(mem_panel, wxT("Mem")); m_MainNotebook->AddPage(mem_panel, _("Memory"));
m_Regs = new DSPRegisterView(this, ID_DSP_REGS); m_Regs = new DSPRegisterView(this, ID_DSP_REGS);
@ -100,14 +100,14 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
m_mgr.AddPane(m_SymbolList, wxAuiPaneInfo(). m_mgr.AddPane(m_SymbolList, wxAuiPaneInfo().
Left().CloseButton(false). Left().CloseButton(false).
Caption(wxT("Symbols")).Dockable(true)); Caption(_("Symbols")).Dockable(true));
m_mgr.AddPane(m_MainNotebook, wxAuiPaneInfo(). m_mgr.AddPane(m_MainNotebook, wxAuiPaneInfo().
Name(wxT("m_MainNotebook")).Center(). Name("m_MainNotebook").Center().
CloseButton(false).MaximizeButton(true)); CloseButton(false).MaximizeButton(true));
m_mgr.AddPane(m_Regs, wxAuiPaneInfo().Right(). m_mgr.AddPane(m_Regs, wxAuiPaneInfo().Right().
CloseButton(false).Caption(wxT("Registers")). CloseButton(false).Caption(_("Registers")).
Dockable(true)); Dockable(true));
UpdateState(); UpdateState();
@ -189,14 +189,14 @@ void DSPDebuggerLLE::UpdateState()
{ {
if (DSPCore_GetState() == DSPCORE_RUNNING) if (DSPCore_GetState() == DSPCORE_RUNNING)
{ {
m_Toolbar->SetToolLabel(ID_RUNTOOL, wxT("Pause")); m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Pause"));
m_Toolbar->SetToolBitmap(ID_RUNTOOL, m_Toolbar->SetToolBitmap(ID_RUNTOOL,
wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10,10))); wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10,10)));
m_Toolbar->EnableTool(ID_STEPTOOL, false); m_Toolbar->EnableTool(ID_STEPTOOL, false);
} }
else else
{ {
m_Toolbar->SetToolLabel(ID_RUNTOOL, wxT("Run")); m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Run"));
m_Toolbar->SetToolBitmap(ID_RUNTOOL, m_Toolbar->SetToolBitmap(ID_RUNTOOL,
wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_OTHER, wxSize(10,10))); wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_OTHER, wxSize(10,10)));
m_Toolbar->EnableTool(ID_STEPTOOL, true); m_Toolbar->EnableTool(ID_STEPTOOL, true);

View File

@ -25,7 +25,7 @@ wxString CDSPRegTable::GetValue(int row, int col)
switch (col) switch (col)
{ {
case 0: return StrToWxStr(pdregname(row)); case 0: return StrToWxStr(pdregname(row));
case 1: return wxString::Format(wxT("0x%04x"), DSPCore_ReadRegister(row)); case 1: return wxString::Format("0x%04x", DSPCore_ReadRegister(row));
default: return wxEmptyString; default: return wxEmptyString;
} }
} }
@ -56,7 +56,7 @@ wxGridCellAttr *CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi
{ {
wxGridCellAttr *attr = new wxGridCellAttr(); wxGridCellAttr *attr = new wxGridCellAttr();
attr->SetBackgroundColour(wxColour(wxT("#FFFFFF"))); attr->SetBackgroundColour(*wxWHITE);
switch (col) switch (col)
{ {
@ -69,7 +69,7 @@ wxGridCellAttr *CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi
} }
if (col == 1) if (col == 1)
attr->SetTextColour(m_CachedRegHasChanged[row] ? wxColor(wxT("#FF0000")) : wxColor(wxT("#000000"))); attr->SetTextColour(m_CachedRegHasChanged[row] ? *wxRED : *wxBLACK);
attr->IncRef(); attr->IncRef();
return attr; return attr;

View File

@ -153,7 +153,7 @@ void GFXDebuggerPanel::CreateGUIControls()
m_pButtonPauseAtNextFrame = new wxButton(this, ID_PAUSE_AT_NEXT_FRAME, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame")); m_pButtonPauseAtNextFrame = new wxButton(this, ID_PAUSE_AT_NEXT_FRAME, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame"));
m_pButtonCont = new wxButton(this, ID_CONT, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue")); m_pButtonCont = new wxButton(this, ID_CONT, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue"));
m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); m_pCount = new wxTextCtrl(this, ID_COUNT, "1", wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count"));
m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList")); m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList"));
for (int i=0; i<numPauseEventMap; i++) for (int i=0; i<numPauseEventMap; i++)

View File

@ -9,5 +9,5 @@
#include "DolphinWX/Debugger/DebuggerUIUtil.h" #include "DolphinWX/Debugger/DebuggerUIUtil.h"
// The default font // The default font
wxFont DebuggerFont = wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false, wxT("monospace")); wxFont DebuggerFont = wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false, "monospace");

View File

@ -54,9 +54,9 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
{ {
wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* sizerSplit = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sizerSplit = new wxBoxSizer(wxHORIZONTAL);
sizerSplit->Add(ppc_box = new wxTextCtrl(this, IDM_PPC_BOX, _T("(ppc)"), sizerSplit->Add(ppc_box = new wxTextCtrl(this, IDM_PPC_BOX, "(ppc)",
wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE), 1, wxEXPAND); wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE), 1, wxEXPAND);
sizerSplit->Add(x86_box = new wxTextCtrl(this, IDM_X86_BOX, _T("(x86)"), sizerSplit->Add(x86_box = new wxTextCtrl(this, IDM_X86_BOX, "(x86)",
wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE), 1, wxEXPAND); wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE), 1, wxEXPAND);
sizerBig->Add(block_list = new JitBlockList(this, IDM_BLOCKLIST, sizerBig->Add(block_list = new JitBlockList(this, IDM_BLOCKLIST,
wxDefaultPosition, wxSize(100, 140), wxDefaultPosition, wxSize(100, 140),
@ -66,7 +66,7 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
// sizerBig->Add(memview, 5, wxEXPAND); // sizerBig->Add(memview, 5, wxEXPAND);
// sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3); // sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3);
sizerBig->Add(button_refresh = new wxButton(this, IDM_REFRESH_LIST, _("&Refresh"))); sizerBig->Add(button_refresh = new wxButton(this, IDM_REFRESH_LIST, _("&Refresh")));
// sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_ADDRBOX, _T(""))); // sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_ADDRBOX, ""));
// sizerRight->Add(new wxButton(this, IDM_SETPC, _("S&et PC"))); // sizerRight->Add(new wxButton(this, IDM_SETPC, _("S&et PC")));
SetSizer(sizerBig); SetSizer(sizerBig);
@ -115,9 +115,8 @@ void CJitWindow::Compare(u32 em_address)
// Do not merge this "if" with the above - block_num changes inside it. // Do not merge this "if" with the above - block_num changes inside it.
if (block_num < 0) if (block_num < 0)
{ {
ppc_box->SetValue(StrToWxStr(StringFromFormat("(non-code address: %08x)", ppc_box->SetValue(_(StringFromFormat("(non-code address: %08x)", em_address)));
em_address))); x86_box->SetValue(_("(no translation)"));
x86_box->SetValue(StrToWxStr(StringFromFormat("(no translation)")));
delete[] xDis; delete[] xDis;
return; return;
} }

View File

@ -23,7 +23,7 @@
#include "DolphinWX/Debugger/BreakpointWindow.h" #include "DolphinWX/Debugger/BreakpointWindow.h"
#include "DolphinWX/Debugger/MemoryCheckDlg.h" #include "DolphinWX/Debugger/MemoryCheckDlg.h"
#define TEXT_BOX(text) new wxStaticText(this, wxID_ANY, wxT(text)) #define TEXT_BOX(text) new wxStaticText(this, wxID_ANY, _(text))
BEGIN_EVENT_TABLE(MemoryCheckDlg, wxDialog) BEGIN_EVENT_TABLE(MemoryCheckDlg, wxDialog)
EVT_BUTTON(wxID_OK, MemoryCheckDlg::OnOK) EVT_BUTTON(wxID_OK, MemoryCheckDlg::OnOK)
@ -33,8 +33,8 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow *parent)
: wxDialog(parent, wxID_ANY, _("Memory Check")) : wxDialog(parent, wxID_ANY, _("Memory Check"))
, m_parent(parent) , m_parent(parent)
{ {
m_pEditStartAddress = new wxTextCtrl(this, wxID_ANY, wxT("")); m_pEditStartAddress = new wxTextCtrl(this, wxID_ANY, "");
m_pEditEndAddress = new wxTextCtrl(this, wxID_ANY, wxT("")); m_pEditEndAddress = new wxTextCtrl(this, wxID_ANY, "");
m_pWriteFlag = new wxCheckBox(this, wxID_ANY, _("Write")); m_pWriteFlag = new wxCheckBox(this, wxID_ANY, _("Write"));
m_pWriteFlag->SetValue(true); m_pWriteFlag->SetValue(true);
m_pReadFlag = new wxCheckBox(this, wxID_ANY, _("Read")); m_pReadFlag = new wxCheckBox(this, wxID_ANY, _("Read"));
@ -43,17 +43,17 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow *parent)
m_log_flag->SetValue(true); m_log_flag->SetValue(true);
m_break_flag = new wxCheckBox(this, wxID_ANY, _("Break")); m_break_flag = new wxCheckBox(this, wxID_ANY, _("Break"));
wxStaticBoxSizer *sAddressRangeBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("Address Range")); wxStaticBoxSizer *sAddressRangeBox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Address Range"));
sAddressRangeBox->Add(TEXT_BOX("Start"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5); sAddressRangeBox->Add(TEXT_BOX("Start"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
sAddressRangeBox->Add(m_pEditStartAddress, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10); sAddressRangeBox->Add(m_pEditStartAddress, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
sAddressRangeBox->Add(TEXT_BOX("End"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5); sAddressRangeBox->Add(TEXT_BOX("End"), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
sAddressRangeBox->Add(m_pEditEndAddress, 1, wxALIGN_CENTER_VERTICAL); sAddressRangeBox->Add(m_pEditEndAddress, 1, wxALIGN_CENTER_VERTICAL);
wxStaticBoxSizer *sActionBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Action")); wxStaticBoxSizer *sActionBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Action"));
sActionBox->Add(m_pWriteFlag); sActionBox->Add(m_pWriteFlag);
sActionBox->Add(m_pReadFlag); sActionBox->Add(m_pReadFlag);
wxBoxSizer* sFlags = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Flags")); wxBoxSizer* sFlags = new wxStaticBoxSizer(wxVERTICAL, this, _("Flags"));
sFlags->Add(m_log_flag); sFlags->Add(m_log_flag);
sFlags->Add(m_break_flag); sFlags->Add(m_break_flag);

View File

@ -147,7 +147,7 @@ void CMemoryView::OnPopupMenu(wxCommandEvent& event)
{ {
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
case IDM_COPYADDRESS: case IDM_COPYADDRESS:
wxTheClipboard->SetData(new wxTextDataObject(wxString::Format(_T("%08x"), selection))); wxTheClipboard->SetData(new wxTextDataObject(wxString::Format("%08x", selection)));
break; break;
case IDM_COPYHEX: case IDM_COPYHEX:
@ -189,18 +189,18 @@ void CMemoryView::OnMouseDownR(wxMouseEvent& event)
{ {
// popup menu // popup menu
wxMenu* menu = new wxMenu; wxMenu* menu = new wxMenu;
//menu.Append(IDM_GOTOINMEMVIEW, "&Goto in mem view"); //menu.Append(IDM_GOTOINMEMVIEW, _("&Goto in mem view"));
#if wxUSE_CLIPBOARD #if wxUSE_CLIPBOARD
menu->Append(IDM_COPYADDRESS, StrToWxStr("Copy &address")); menu->Append(IDM_COPYADDRESS, _("Copy &address"));
menu->Append(IDM_COPYHEX, StrToWxStr("Copy &hex")); menu->Append(IDM_COPYHEX, _("Copy &hex"));
#endif #endif
menu->Append(IDM_TOGGLEMEMORY, StrToWxStr("Toggle &memory")); menu->Append(IDM_TOGGLEMEMORY, _("Toggle &memory"));
wxMenu* viewAsSubMenu = new wxMenu; wxMenu* viewAsSubMenu = new wxMenu;
viewAsSubMenu->Append(IDM_VIEWASFP, StrToWxStr("FP value")); viewAsSubMenu->Append(IDM_VIEWASFP, _("FP value"));
viewAsSubMenu->Append(IDM_VIEWASASCII, StrToWxStr("ASCII")); viewAsSubMenu->Append(IDM_VIEWASASCII, "ASCII");
viewAsSubMenu->Append(IDM_VIEWASHEX, StrToWxStr("Hex")); viewAsSubMenu->Append(IDM_VIEWASHEX, _("Hex"));
menu->AppendSubMenu(viewAsSubMenu, StrToWxStr("View As:")); menu->AppendSubMenu(viewAsSubMenu, _("View As:"));
PopupMenu(menu); PopupMenu(menu);
} }
@ -209,14 +209,14 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
{ {
wxPaintDC dc(this); wxPaintDC dc(this);
wxRect rc = GetClientRect(); wxRect rc = GetClientRect();
wxFont hFont(_T("Courier")); wxFont hFont("Courier");
hFont.SetFamily(wxFONTFAMILY_TELETYPE); hFont.SetFamily(wxFONTFAMILY_TELETYPE);
wxCoord w,h; wxCoord w,h;
dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&hFont); dc.GetTextExtent("0WJyq", &w, &h, nullptr, nullptr, &hFont);
if (h > rowHeight) if (h > rowHeight)
rowHeight = h; rowHeight = h;
dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&DebuggerFont); dc.GetTextExtent("0WJyq", &w, &h, nullptr, nullptr, &DebuggerFont);
if (h > rowHeight) if (h > rowHeight)
rowHeight = h; rowHeight = h;
@ -225,7 +225,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
else else
dc.SetFont(DebuggerFont); dc.SetFont(DebuggerFont);
dc.GetTextExtent(_T("W"),&w,&h); dc.GetTextExtent("W", &w, &h);
int fontSize = w; int fontSize = w;
int textPlacement = 17 + 9 * fontSize; int textPlacement = 17 + 9 * fontSize;
@ -233,15 +233,15 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
int width = rc.width; int width = rc.width;
int numRows = (rc.height / rowHeight) / 2 + 2; int numRows = (rc.height / rowHeight) / 2 + 2;
dc.SetBackgroundMode(wxTRANSPARENT); dc.SetBackgroundMode(wxTRANSPARENT);
const wxChar* bgColor = _T("#ffffff"); const wxColour bgColor = *wxWHITE;
wxPen nullPen(bgColor); wxPen nullPen(bgColor);
wxPen currentPen(_T("#000000")); wxPen currentPen(*wxBLACK_PEN);
wxPen selPen(_T("#808080")); // gray wxPen selPen(*wxGREY_PEN);
nullPen.SetStyle(wxTRANSPARENT); nullPen.SetStyle(wxTRANSPARENT);
wxBrush currentBrush(_T("#FFEfE8")); // light gray wxBrush currentBrush(*wxLIGHT_GREY_BRUSH);
wxBrush pcBrush(_T("#70FF70")); // green wxBrush pcBrush(*wxGREEN_BRUSH);
wxBrush mcBrush(_T("#1133FF")); // blue wxBrush mcBrush(*wxBLUE_BRUSH);
wxBrush bgBrush(bgColor); wxBrush bgBrush(bgColor);
wxBrush nullBrush(bgColor); wxBrush nullBrush(bgColor);
nullBrush.SetStyle(wxTRANSPARENT); nullBrush.SetStyle(wxTRANSPARENT);
@ -259,9 +259,9 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
int rowY1 = rc.height / 2 + rowHeight * row - rowHeight / 2; int rowY1 = rc.height / 2 + rowHeight * row - rowHeight / 2;
int rowY2 = rc.height / 2 + rowHeight * row + rowHeight / 2; int rowY2 = rc.height / 2 + rowHeight * row + rowHeight / 2;
wxString temp = wxString::Format(_T("%08x"), address); wxString temp = wxString::Format("%08x", address);
u32 col = debugger->GetColor(address); u32 col = debugger->GetColor(address);
wxBrush rowBrush(wxColor(col >> 16, col >> 8, col)); wxBrush rowBrush(wxColour(col >> 16, col >> 8, col));
dc.SetBrush(nullBrush); dc.SetBrush(nullBrush);
dc.SetPen(nullPen); dc.SetPen(nullPen);
dc.DrawRectangle(0, rowY1, 16, rowY2); dc.DrawRectangle(0, rowY1, 16, rowY2);
@ -278,16 +278,16 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
dc.DrawRectangle(16, rowY1, width, rowY2 - 1); dc.DrawRectangle(16, rowY1, width, rowY2 - 1);
dc.SetBrush(currentBrush); dc.SetBrush(currentBrush);
dc.SetTextForeground(_T("#600000")); dc.SetTextForeground("#600000"); // Dark red
dc.DrawText(temp, 17, rowY1); dc.DrawText(temp, 17, rowY1);
if (viewAsType != VIEWAS_HEX) if (viewAsType != VIEWAS_HEX)
{ {
char mem[256]; char mem[256];
debugger->GetRawMemoryString(memory, address, mem, 256); debugger->GetRawMemoryString(memory, address, mem, 256);
dc.SetTextForeground(_T("#000080")); dc.SetTextForeground(wxTheColourDatabase->Find("NAVY"));
dc.DrawText(StrToWxStr(mem), 17+fontSize*(8), rowY1); dc.DrawText(StrToWxStr(mem), 17+fontSize*(8), rowY1);
dc.SetTextForeground(_T("#000000")); dc.SetTextForeground(*wxBLACK);
} }
if (debugger->IsAlive()) if (debugger->IsAlive())
@ -371,7 +371,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
if (desc[0] == 0) if (desc[0] == 0)
strcpy(desc, debugger->GetDescription(address).c_str()); strcpy(desc, debugger->GetDescription(address).c_str());
dc.SetTextForeground(_T("#0000FF")); dc.SetTextForeground(*wxBLUE);
if (strlen(desc)) if (strlen(desc))
dc.DrawText(StrToWxStr(desc), 17+fontSize*((8+8+8+30)*2), rowY1); dc.DrawText(StrToWxStr(desc), 17+fontSize*((8+8+8+30)*2), rowY1);

View File

@ -94,8 +94,8 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
//sizerBig->Add(sizerLeft, 1, wxEXPAND); //sizerBig->Add(sizerLeft, 1, wxEXPAND);
sizerBig->Add(memview, 20, wxEXPAND); sizerBig->Add(memview, 20, wxEXPAND);
sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3); sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3);
sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_MEM_ADDRBOX, _T(""))); sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_MEM_ADDRBOX, ""));
sizerRight->Add(valbox = new wxTextCtrl(this, IDM_VALBOX, _T(""))); sizerRight->Add(valbox = new wxTextCtrl(this, IDM_VALBOX, ""));
sizerRight->Add(new wxButton(this, IDM_SETVALBUTTON, _("Set &Value"))); sizerRight->Add(new wxButton(this, IDM_SETVALBUTTON, _("Set &Value")));
sizerRight->AddSpacer(5); sizerRight->AddSpacer(5);
@ -108,15 +108,15 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search")); wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search"));
sizerSearchType->Add(btnSearch = new wxButton(this, IDM_SEARCH, _("Search"))); sizerSearchType->Add(btnSearch = new wxButton(this, IDM_SEARCH, _("Search")));
sizerSearchType->Add(chkAscii = new wxCheckBox(this, IDM_ASCII, _T("&Ascii "))); sizerSearchType->Add(chkAscii = new wxCheckBox(this, IDM_ASCII, "&Ascii "));
sizerSearchType->Add(chkHex = new wxCheckBox(this, IDM_HEX, _("&Hex"))); sizerSearchType->Add(chkHex = new wxCheckBox(this, IDM_HEX, _("&Hex")));
sizerRight->Add(sizerSearchType); sizerRight->Add(sizerSearchType);
wxStaticBoxSizer* sizerDataTypes = new wxStaticBoxSizer(wxVERTICAL, this, _("Data Type")); wxStaticBoxSizer* sizerDataTypes = new wxStaticBoxSizer(wxVERTICAL, this, _("Data Type"));
sizerDataTypes->SetMinSize(74, 40); sizerDataTypes->SetMinSize(74, 40);
sizerDataTypes->Add(chk8 = new wxCheckBox(this, IDM_U8, _T("&U8"))); sizerDataTypes->Add(chk8 = new wxCheckBox(this, IDM_U8, "&U8"));
sizerDataTypes->Add(chk16 = new wxCheckBox(this, IDM_U16, _T("&U16"))); sizerDataTypes->Add(chk16 = new wxCheckBox(this, IDM_U16, "&U16"));
sizerDataTypes->Add(chk32 = new wxCheckBox(this, IDM_U32, _T("&U32"))); sizerDataTypes->Add(chk32 = new wxCheckBox(this, IDM_U32, "&U32"));
sizerRight->Add(sizerDataTypes); sizerRight->Add(sizerDataTypes);
SetSizer(sizerBig); SetSizer(sizerBig);
chkHex->SetValue(1); //Set defaults chkHex->SetValue(1); //Set defaults
@ -163,13 +163,13 @@ void CMemoryWindow::SetMemoryValue(wxCommandEvent& event)
if (!TryParse(std::string("0x") + str_addr, &addr)) if (!TryParse(std::string("0x") + str_addr, &addr))
{ {
PanicAlert("Invalid Address: %s", str_addr.c_str()); PanicAlertT("Invalid Address: %s", str_addr.c_str());
return; return;
} }
if (!TryParse(std::string("0x") + str_val, &val)) if (!TryParse(std::string("0x") + str_val, &val))
{ {
PanicAlert("Invalid Value: %s", str_val.c_str()); PanicAlertT("Invalid Value: %s", str_val.c_str());
return; return;
} }
@ -416,7 +416,7 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
//Match was found //Match was found
wxMessageBox(_("A match was found. Placing viewer at the offset.")); wxMessageBox(_("A match was found. Placing viewer at the offset."));
wxChar tmpwxstr[128] = {0}; wxChar tmpwxstr[128] = {0};
wxSprintf(tmpwxstr, _T("%08x"), i); wxSprintf(tmpwxstr, "%08x", i);
wxString tmpwx(tmpwxstr); wxString tmpwx(tmpwxstr);
addrbox->SetValue(tmpwx); addrbox->SetValue(tmpwx);
//memview->curAddress = i; //memview->curAddress = i;

View File

@ -55,10 +55,10 @@ wxString CRegTable::GetValue(int row, int col)
switch (col) switch (col)
{ {
case 0: return StrToWxStr(GetGPRName(row)); case 0: return StrToWxStr(GetGPRName(row));
case 1: return wxString::Format(wxT("%08x"), GPR(row)); case 1: return wxString::Format("%08x", GPR(row));
case 2: return StrToWxStr(GetFPRName(row)); case 2: return StrToWxStr(GetFPRName(row));
case 3: return wxString::Format(wxT("%016llx"), riPS0(row)); case 3: return wxString::Format("%016llx", riPS0(row));
case 4: return wxString::Format(wxT("%016llx"), riPS1(row)); case 4: return wxString::Format("%016llx", riPS1(row));
default: return wxEmptyString; default: return wxEmptyString;
} }
} }
@ -69,7 +69,7 @@ wxString CRegTable::GetValue(int row, int col)
switch (col) switch (col)
{ {
case 0: return StrToWxStr(special_reg_names[row - 32]); case 0: return StrToWxStr(special_reg_names[row - 32]);
case 1: return wxString::Format(wxT("%08x"), GetSpecialRegValue(row - 32)); case 1: return wxString::Format("%08x", GetSpecialRegValue(row - 32));
default: return wxEmptyString; default: return wxEmptyString;
} }
} }
@ -144,7 +144,7 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind)
{ {
wxGridCellAttr *attr = new wxGridCellAttr(); wxGridCellAttr *attr = new wxGridCellAttr();
attr->SetBackgroundColour(wxColour(wxT("#FFFFFF"))); //wxWHITE attr->SetBackgroundColour(*wxWHITE);
attr->SetFont(DebuggerFont); attr->SetFont(DebuggerFont);
switch (col) switch (col)
@ -169,7 +169,7 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind)
case 4: red = row < 32 ? m_CachedFRegHasChanged[row][col-3] : false; break; case 4: red = row < 32 ? m_CachedFRegHasChanged[row][col-3] : false; break;
} }
attr->SetTextColour(red ? wxColor(wxT("#FF0000")) : wxColor(wxT("#000000"))); attr->SetTextColour(red ? *wxRED : *wxBLACK);
attr->IncRef(); attr->IncRef();
return attr; return attr;
} }

View File

@ -418,7 +418,7 @@ void FifoPlayerDlg::OnSaveFile(wxCommandEvent& WXUNUSED(event))
// Wasn't able to save the file, shit's whack, yo. // Wasn't able to save the file, shit's whack, yo.
if (!result) if (!result)
PanicAlert("Error saving file"); PanicAlertT("Error saving file");
} }
} }
} }

View File

@ -354,11 +354,11 @@ CFrame::CFrame(wxFrame* parent,
m_Mgr = new wxAuiManager(this, wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE); m_Mgr = new wxAuiManager(this, wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
m_Mgr->AddPane(m_Panel, wxAuiPaneInfo() m_Mgr->AddPane(m_Panel, wxAuiPaneInfo()
.Name(_T("Pane 0")).Caption(_T("Pane 0")).PaneBorder(false) .Name("Pane 0").Caption("Pane 0").PaneBorder(false)
.CaptionVisible(false).Layer(0).Center().Show()); .CaptionVisible(false).Layer(0).Center().Show());
if (!g_pCodeWindow) if (!g_pCodeWindow)
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo() m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
.Name(_T("Pane 1")).Caption(_("Logging")).CaptionVisible(true) .Name("Pane 1").Caption(_("Logging")).CaptionVisible(true)
.Layer(0).FloatingSize(wxSize(600, 350)).CloseButton(true).Hide()); .Layer(0).FloatingSize(wxSize(600, 350)).CloseButton(true).Hide());
AuiFullscreen = m_Mgr->SavePerspective(); AuiFullscreen = m_Mgr->SavePerspective();
@ -400,7 +400,7 @@ CFrame::CFrame(wxFrame* parent,
m_Mgr->Update(); m_Mgr->Update();
#ifdef _WIN32 #ifdef _WIN32
SetToolTip(wxT("")); SetToolTip("");
GetToolTip()->SetAutoPop(25000); GetToolTip()->SetAutoPop(25000);
#endif #endif
@ -565,8 +565,8 @@ void CFrame::OnResize(wxSizeEvent& event)
} }
// Make sure the logger pane is a sane size // Make sure the logger pane is a sane size
if (!g_pCodeWindow && m_LogWindow && m_Mgr->GetPane(_T("Pane 1")).IsShown() && if (!g_pCodeWindow && m_LogWindow && m_Mgr->GetPane("Pane 1").IsShown() &&
!m_Mgr->GetPane(_T("Pane 1")).IsFloating() && !m_Mgr->GetPane("Pane 1").IsFloating() &&
(m_LogWindow->x > GetClientRect().GetWidth() || (m_LogWindow->x > GetClientRect().GetWidth() ||
m_LogWindow->y > GetClientRect().GetHeight())) m_LogWindow->y > GetClientRect().GetHeight()))
ShowResizePane(); ShowResizePane();
@ -679,17 +679,17 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height)
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
(SConfig::GetInstance().m_InterfaceLogWindow || (SConfig::GetInstance().m_InterfaceLogWindow ||
SConfig::GetInstance().m_InterfaceLogConfigWindow) && SConfig::GetInstance().m_InterfaceLogConfigWindow) &&
!m_Mgr->GetPane(wxT("Pane 1")).IsFloating()) !m_Mgr->GetPane("Pane 1").IsFloating())
{ {
switch (m_Mgr->GetPane(wxT("Pane 1")).dock_direction) switch (m_Mgr->GetPane("Pane 1").dock_direction)
{ {
case wxAUI_DOCK_LEFT: case wxAUI_DOCK_LEFT:
case wxAUI_DOCK_RIGHT: case wxAUI_DOCK_RIGHT:
log_width = m_Mgr->GetPane(wxT("Pane 1")).rect.GetWidth(); log_width = m_Mgr->GetPane("Pane 1").rect.GetWidth();
break; break;
case wxAUI_DOCK_TOP: case wxAUI_DOCK_TOP:
case wxAUI_DOCK_BOTTOM: case wxAUI_DOCK_BOTTOM:
log_height = m_Mgr->GetPane(wxT("Pane 1")).rect.GetHeight(); log_height = m_Mgr->GetPane("Pane 1").rect.GetHeight();
break; break;
} }
} }
@ -770,7 +770,7 @@ void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
else else
{ {
// Game started by double click // Game started by double click
BootGame(std::string("")); BootGame("");
} }
} }

View File

@ -73,7 +73,7 @@ class CRenderFrame : public wxFrame
public: public:
CRenderFrame(wxFrame* parent, CRenderFrame(wxFrame* parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
const wxString& title = wxT("Dolphin"), const wxString& title = "Dolphin",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE); long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE);
@ -92,7 +92,7 @@ class CFrame : public CRenderFrame
public: public:
CFrame(wxFrame* parent, CFrame(wxFrame* parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
const wxString& title = wxT("Dolphin"), const wxString& title = "Dolphin",
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
bool _UseDebugger = false, bool _UseDebugger = false,
@ -243,7 +243,7 @@ private:
void OnFloatingPageSize(wxSizeEvent& event); void OnFloatingPageSize(wxSizeEvent& event);
void DoFloatNotebookPage(wxWindowID Id); void DoFloatNotebookPage(wxWindowID Id);
wxFrame * CreateParentFrame(wxWindowID Id = wxID_ANY, wxFrame * CreateParentFrame(wxWindowID Id = wxID_ANY,
const wxString& title = wxT(""), const wxString& title = "",
wxWindow * = nullptr); wxWindow * = nullptr);
wxString AuiFullscreen, AuiCurrent; wxString AuiFullscreen, AuiCurrent;
void AddPane(); void AddPane();

View File

@ -49,12 +49,12 @@
void CFrame::OnManagerResize(wxAuiManagerEvent& event) void CFrame::OnManagerResize(wxAuiManagerEvent& event)
{ {
if (!g_pCodeWindow && m_LogWindow && if (!g_pCodeWindow && m_LogWindow &&
m_Mgr->GetPane(_T("Pane 1")).IsShown() && m_Mgr->GetPane("Pane 1").IsShown() &&
!m_Mgr->GetPane(_T("Pane 1")).IsFloating()) !m_Mgr->GetPane("Pane 1").IsFloating())
{ {
m_LogWindow->x = m_Mgr->GetPane(_T("Pane 1")).rect.GetWidth(); m_LogWindow->x = m_Mgr->GetPane("Pane 1").rect.GetWidth();
m_LogWindow->y = m_Mgr->GetPane(_T("Pane 1")).rect.GetHeight(); m_LogWindow->y = m_Mgr->GetPane("Pane 1").rect.GetHeight();
m_LogWindow->winpos = m_Mgr->GetPane(_T("Pane 1")).dock_direction; m_LogWindow->winpos = m_Mgr->GetPane("Pane 1").dock_direction;
} }
event.Skip(); event.Skip();
} }
@ -85,7 +85,7 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
wxMessageBox(_("At least one pane must remain open."), wxMessageBox(_("At least one pane must remain open."),
_("Notice"), wxOK, this); _("Notice"), wxOK, this);
} }
else if (nb->GetPageCount() != 0 && !nb->GetPageText(0).IsSameAs(wxT("<>"))) else if (nb->GetPageCount() != 0 && !nb->GetPageText(0).IsSameAs("<>"))
{ {
wxMessageBox(_("You can't close panes that have pages in them."), wxMessageBox(_("You can't close panes that have pages in them."),
_("Notice"), wxOK, this); _("Notice"), wxOK, this);
@ -339,7 +339,7 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
if (Win && Win->IsEnabled()) if (Win && Win->IsEnabled())
{ {
Item = new wxMenuItem(MenuPopup, i + IDM_FLOAT_LOGWINDOW - IDM_LOGWINDOW, Item = new wxMenuItem(MenuPopup, i + IDM_FLOAT_LOGWINDOW - IDM_LOGWINDOW,
Win->GetName(), wxT(""), wxITEM_CHECK); Win->GetName(), "", wxITEM_CHECK);
MenuPopup->Append(Item); MenuPopup->Append(Item);
Item->Check(!!FindWindowById(i + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW)); Item->Check(!!FindWindowById(i + IDM_LOGWINDOW_PARENT - IDM_LOGWINDOW));
} }
@ -369,7 +369,7 @@ void CFrame::ShowResizePane()
if (m_LogWindow->y > GetClientRect().GetHeight()) if (m_LogWindow->y > GetClientRect().GetHeight())
m_LogWindow->y = GetClientRect().GetHeight() / 2; m_LogWindow->y = GetClientRect().GetHeight() / 2;
wxAuiPaneInfo &pane = m_Mgr->GetPane(wxT("Pane 1")); wxAuiPaneInfo &pane = m_Mgr->GetPane("Pane 1");
// Hide first otherwise a resize doesn't work // Hide first otherwise a resize doesn't work
pane.Hide(); pane.Hide();
@ -399,7 +399,7 @@ void CFrame::TogglePane()
{ {
if (NB->GetPageCount() == 0) if (NB->GetPageCount() == 0)
{ {
m_Mgr->GetPane(_T("Pane 1")).Hide(); m_Mgr->GetPane("Pane 1").Hide();
m_Mgr->Update(); m_Mgr->Update();
} }
else else
@ -492,12 +492,10 @@ void CFrame::OnDropDownSettingsToolbar(wxAuiToolBarEvent& event)
_("Add new pane")); _("Add new pane"));
menuPopup->Append(Item); menuPopup->Append(Item);
menuPopup->Append(new wxMenuItem(menuPopup)); menuPopup->Append(new wxMenuItem(menuPopup));
Item = new wxMenuItem(menuPopup, IDM_TAB_SPLIT, _("Tab split"), Item = new wxMenuItem(menuPopup, IDM_TAB_SPLIT, _("Tab split"), "", wxITEM_CHECK);
wxT(""), wxITEM_CHECK);
menuPopup->Append(Item); menuPopup->Append(Item);
Item->Check(m_bTabSplit); Item->Check(m_bTabSplit);
Item = new wxMenuItem(menuPopup, IDM_NO_DOCKING, _("No docking"), Item = new wxMenuItem(menuPopup, IDM_NO_DOCKING, _("No docking"), "", wxITEM_CHECK);
wxT(""), wxITEM_CHECK);
menuPopup->Append(Item); menuPopup->Append(Item);
Item->Check(m_bNoDocking); Item->Check(m_bNoDocking);
@ -539,8 +537,7 @@ void CFrame::OnDropDownToolbarItem(wxAuiToolBarEvent& event)
for (u32 i = 0; i < Perspectives.size(); i++) for (u32 i = 0; i < Perspectives.size(); i++)
{ {
wxMenuItem* mItem = new wxMenuItem(menuPopup, IDM_PERSPECTIVES_0 + i, wxMenuItem* mItem = new wxMenuItem(menuPopup, IDM_PERSPECTIVES_0 + i,
StrToWxStr(Perspectives[i].Name), StrToWxStr(Perspectives[i].Name), "", wxITEM_CHECK);
wxT(""), wxITEM_CHECK);
menuPopup->Append(mItem); menuPopup->Append(mItem);
@ -617,15 +614,15 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
{ {
return; return;
} }
else if (dlg.GetValue().Find(wxT(",")) != -1) else if (dlg.GetValue().Find(",") != -1)
{ {
wxMessageBox(_("The name can not contain the character ','"), wxMessageBox(_("The name can not contain the character ','"),
_("Notice"), wxOK, this); _("Notice"), wxOK, this);
wxString Str = dlg.GetValue(); wxString Str = dlg.GetValue();
Str.Replace(wxT(","), wxT(""), true); Str.Replace(",", "", true);
dlg.SetValue(Str); dlg.SetValue(Str);
} }
else if (dlg.GetValue().IsSameAs(wxT(""))) else if (dlg.GetValue().IsSameAs(""))
{ {
wxMessageBox(_("The name can not be empty"), wxMessageBox(_("The name can not be empty"),
_("Notice"), wxOK, this); _("Notice"), wxOK, this);
@ -799,7 +796,7 @@ void CFrame::ReloadPanes()
// Create new panes with notebooks // Create new panes with notebooks
for (u32 i = 0; i < Perspectives[ActivePerspective].Width.size() - 1; i++) for (u32 i = 0; i < Perspectives[ActivePerspective].Width.size() - 1; i++)
{ {
wxString PaneName = wxString::Format(_T("Pane %i"), i + 1); wxString PaneName = wxString::Format("Pane %i", i + 1);
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide() m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide()
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking).Position(i) .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking).Position(i)
.Name(PaneName).Caption(PaneName)); .Name(PaneName).Caption(PaneName));
@ -963,7 +960,7 @@ void CFrame::SaveIniPerspectives()
void CFrame::AddPane() void CFrame::AddPane()
{ {
int PaneNum = GetNotebookCount() + 1; int PaneNum = GetNotebookCount() + 1;
wxString PaneName = wxString::Format(_T("Pane %i"), PaneNum); wxString PaneName = wxString::Format("Pane %i", PaneNum);
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo() m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking) .CaptionVisible(m_bEdit).Dockable(!m_bNoDocking)
.Name(PaneName).Caption(PaneName) .Name(PaneName).Caption(PaneName)
@ -1030,12 +1027,12 @@ void CFrame::AddRemoveBlankPage()
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window; wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
for (u32 j = 0; j < NB->GetPageCount(); j++) for (u32 j = 0; j < NB->GetPageCount(); j++)
{ {
if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1) if (NB->GetPageText(j).IsSameAs("<>") && NB->GetPageCount() > 1)
NB->DeletePage(j); NB->DeletePage(j);
} }
if (NB->GetPageCount() == 0) if (NB->GetPageCount() == 0)
NB->AddPage(new wxPanel(this, wxID_ANY), wxT("<>"), true); NB->AddPage(new wxPanel(this, wxID_ANY), "<>", true);
} }
} }

View File

@ -148,7 +148,7 @@ void CFrame::CreateMenu()
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs...")); fileMenu->Append(IDM_BROWSE, _("&Browse for ISOs..."));
fileMenu->AppendSeparator(); fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _("E&xit") + wxString(wxT("\tAlt+F4"))); fileMenu->Append(wxID_EXIT, _("E&xit") + wxString("\tAlt+F4"));
m_MenuBar->Append(fileMenu, _("&File")); m_MenuBar->Append(fileMenu, _("&File"));
// Emulation menu // Emulation menu
@ -176,7 +176,7 @@ void CFrame::CreateMenu()
wxMenu *skippingMenu = new wxMenu; wxMenu *skippingMenu = new wxMenu;
emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping")); emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping"));
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(wxT("%i"), i), wxEmptyString, wxITEM_RADIO); skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format("%i", i), wxEmptyString, wxITEM_RADIO);
skippingMenu->Check(IDM_FRAMESKIP0 + SConfig::GetInstance().m_FrameSkip, true); skippingMenu->Check(IDM_FRAMESKIP0 + SConfig::GetInstance().m_FrameSkip, true);
Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip); Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip);
@ -237,7 +237,7 @@ void CFrame::CreateMenu()
toolsMenu->Append(IDM_NETPLAY, _("Start &NetPlay")); toolsMenu->Append(IDM_NETPLAY, _("Start &NetPlay"));
toolsMenu->Append(IDM_MENU_INSTALLWAD, _("Install WAD")); toolsMenu->Append(IDM_MENU_INSTALLWAD, _("Install WAD"));
UpdateWiiMenuChoice(toolsMenu->Append(IDM_LOAD_WII_MENU, wxT("Dummy string to keep wxw happy"))); UpdateWiiMenuChoice(toolsMenu->Append(IDM_LOAD_WII_MENU, "Dummy string to keep wxw happy"));
toolsMenu->Append(IDM_FIFOPLAYER, _("Fifo Player")); toolsMenu->Append(IDM_FIFOPLAYER, _("Fifo Player"));
@ -455,9 +455,9 @@ wxString CFrame::GetMenuLabel(int Id)
Label = _("Load State..."); Label = _("Load State...");
break; break;
case HK_SAVE_FIRST_STATE: Label = wxString("Save Oldest State"); break; case HK_SAVE_FIRST_STATE: Label = _("Save Oldest State"); break;
case HK_UNDO_LOAD_STATE: Label = wxString("Undo Load State"); break; case HK_UNDO_LOAD_STATE: Label = _("Undo Load State"); break;
case HK_UNDO_SAVE_STATE: Label = wxString("Undo Save State"); break; case HK_UNDO_SAVE_STATE: Label = _("Undo Save State"); break;
default: default:
Label = wxString::Format(_("Undefined %i"), Id); Label = wxString::Format(_("Undefined %i"), Id);
@ -540,7 +540,7 @@ void CFrame::RecreateToolbar()
PopulateToolbar(m_ToolBar); PopulateToolbar(m_ToolBar);
m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo(). m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo().
Name(wxT("TBMain")).Caption(wxT("TBMain")). Name("TBMain").Caption("TBMain").
ToolbarPane().Top(). ToolbarPane().Top().
LeftDockable(false).RightDockable(false).Floatable(false)); LeftDockable(false).RightDockable(false).Floatable(false));
@ -550,14 +550,14 @@ void CFrame::RecreateToolbar()
g_pCodeWindow->PopulateToolbar(m_ToolBarDebug); g_pCodeWindow->PopulateToolbar(m_ToolBarDebug);
m_Mgr->AddPane(m_ToolBarDebug, wxAuiPaneInfo(). m_Mgr->AddPane(m_ToolBarDebug, wxAuiPaneInfo().
Name(wxT("TBDebug")).Caption(wxT("TBDebug")). Name("TBDebug").Caption("TBDebug").
ToolbarPane().Top(). ToolbarPane().Top().
LeftDockable(false).RightDockable(false).Floatable(false)); LeftDockable(false).RightDockable(false).Floatable(false));
m_ToolBarAui = new wxAuiToolBar(this, ID_TOOLBAR_AUI, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE); m_ToolBarAui = new wxAuiToolBar(this, ID_TOOLBAR_AUI, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
PopulateToolbarAui(m_ToolBarAui); PopulateToolbarAui(m_ToolBarAui);
m_Mgr->AddPane(m_ToolBarAui, wxAuiPaneInfo(). m_Mgr->AddPane(m_ToolBarAui, wxAuiPaneInfo().
Name(wxT("TBAui")).Caption(wxT("TBAui")). Name("TBAui").Caption("TBAui").
ToolbarPane().Top(). ToolbarPane().Top().
LeftDockable(false).RightDockable(false).Floatable(false)); LeftDockable(false).RightDockable(false).Floatable(false));
} }
@ -650,7 +650,7 @@ void CFrame::DoOpen(bool Boot)
_("Select the file to load"), _("Select the file to load"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") + _("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") +
wxString::Format(wxT("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad;*.dff;*.tmd|%s"), wxString::Format("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad;*.dff;*.tmd|%s",
wxGetTranslation(wxALL_FILES)), wxGetTranslation(wxALL_FILES)),
wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_FILE_MUST_EXIST,
this); this);
@ -748,7 +748,7 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
} }
if (Movie::BeginRecordingInput(controllers)) if (Movie::BeginRecordingInput(controllers))
BootGame(std::string("")); BootGame("");
} }
void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event)) void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
@ -757,7 +757,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
_("Select The Recording File"), _("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_("Dolphin TAS Movies (*.dtm)") + _("Dolphin TAS Movies (*.dtm)") +
wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)), wxString::Format("|*.dtm|%s", wxGetTranslation(wxALL_FILES)),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);
@ -772,7 +772,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
} }
if (Movie::PlayInput(WxStrToStr(path))) if (Movie::PlayInput(WxStrToStr(path)))
BootGame(std::string("")); BootGame("");
} }
void CFrame::OnRecordExport(wxCommandEvent& WXUNUSED (event)) void CFrame::OnRecordExport(wxCommandEvent& WXUNUSED (event))
@ -806,7 +806,7 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED (event))
else else
{ {
// Core is uninitialized, start the game // Core is uninitialized, start the game
BootGame(std::string("")); BootGame("");
} }
} }
@ -1143,10 +1143,10 @@ void CFrame::DoStop()
m_RenderParent = nullptr; m_RenderParent = nullptr;
// Clean framerate indications from the status bar. // Clean framerate indications from the status bar.
GetStatusBar()->SetStatusText(wxT(" "), 0); GetStatusBar()->SetStatusText(" ", 0);
// Clear wiimote connection status from the status bar. // Clear wiimote connection status from the status bar.
GetStatusBar()->SetStatusText(wxT(" "), 1); GetStatusBar()->SetStatusText(" ", 1);
// If batch mode was specified on the command-line, exit now. // If batch mode was specified on the command-line, exit now.
if (m_bBatchMode) if (m_bBatchMode)
@ -1176,7 +1176,7 @@ void CFrame::DoRecordingSave()
_("Select The Recording File"), _("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_("Dolphin TAS Movies (*.dtm)") + _("Dolphin TAS Movies (*.dtm)") +
wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)), wxString::Format("|*.dtm|%s", wxGetTranslation(wxALL_FILES)),
wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT, wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT,
this); this);
@ -1312,7 +1312,7 @@ void CFrame::ClearStatusBar()
{ {
if (this->GetStatusBar()->IsEnabled()) if (this->GetStatusBar()->IsEnabled())
{ {
this->GetStatusBar()->SetStatusText(wxT(""),0); this->GetStatusBar()->SetStatusText("", 0);
} }
} }
@ -1407,7 +1407,7 @@ void CFrame::OnInstallWAD(wxCommandEvent& event)
wxString path = wxFileSelector( wxString path = wxFileSelector(
_("Select a Wii WAD file to install"), _("Select a Wii WAD file to install"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_T("Wii WAD file (*.wad)|*.wad"), "Wii WAD file (*.wad)|*.wad",
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);
fileName = WxStrToStr(path); fileName = WxStrToStr(path);
@ -1474,8 +1474,8 @@ void CFrame::ConnectWiimote(int wm_idx, bool connect)
if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{ {
GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect); GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
wxString msg(wxString::Format(wxT("Wiimote %i %s"), wm_idx + 1, wxString msg(wxString::Format(_("Wiimote %i %s"), wm_idx + 1,
connect ? wxT("Connected") : wxT("Disconnected"))); connect ? _("Connected") : _("Disconnected")));
Core::DisplayMessage(WxStrToStr(msg), 3000); Core::DisplayMessage(WxStrToStr(msg), 3000);
Host_UpdateMainFrame(); Host_UpdateMainFrame();
} }
@ -1511,7 +1511,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event))
_("Select the state to load"), _("Select the state to load"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_("All Save States (sav, s##)") + _("All Save States (sav, s##)") +
wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)), wxString::Format("|*.sav;*.s??|%s", wxGetTranslation(wxALL_FILES)),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);
@ -1525,7 +1525,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
_("Select the state to save"), _("Select the state to save"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_("All Save States (sav, s##)") + _("All Save States (sav, s##)") +
wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)), wxString::Format("|*.sav;*.s??|%s", wxGetTranslation(wxALL_FILES)),
wxFD_SAVE, wxFD_SAVE,
this); this);
@ -1853,21 +1853,21 @@ void CFrame::DoToggleToolbar(bool _show)
{ {
if (_show) if (_show)
{ {
m_Mgr->GetPane(wxT("TBMain")).Show(); m_Mgr->GetPane("TBMain").Show();
if (g_pCodeWindow) if (g_pCodeWindow)
{ {
m_Mgr->GetPane(wxT("TBDebug")).Show(); m_Mgr->GetPane("TBDebug").Show();
m_Mgr->GetPane(wxT("TBAui")).Show(); m_Mgr->GetPane("TBAui").Show();
} }
m_Mgr->Update(); m_Mgr->Update();
} }
else else
{ {
m_Mgr->GetPane(wxT("TBMain")).Hide(); m_Mgr->GetPane("TBMain").Hide();
if (g_pCodeWindow) if (g_pCodeWindow)
{ {
m_Mgr->GetPane(wxT("TBDebug")).Hide(); m_Mgr->GetPane("TBDebug").Hide();
m_Mgr->GetPane(wxT("TBAui")).Hide(); m_Mgr->GetPane("TBAui").Hide();
} }
m_Mgr->Update(); m_Mgr->Update();
} }

View File

@ -308,8 +308,8 @@ void CGameListCtrl::Update()
InitBitmaps(); InitBitmaps();
// add columns // add columns
InsertColumn(COLUMN_DUMMY,_T("")); InsertColumn(COLUMN_DUMMY, "");
InsertColumn(COLUMN_PLATFORM, _T("")); InsertColumn(COLUMN_PLATFORM, "");
InsertColumn(COLUMN_BANNER, _("Banner")); InsertColumn(COLUMN_BANNER, _("Banner"));
InsertColumn(COLUMN_TITLE, _("Title")); InsertColumn(COLUMN_TITLE, _("Title"));
@ -317,7 +317,7 @@ void CGameListCtrl::Update()
// wii titles We show in the same column : company for GC games and // wii titles We show in the same column : company for GC games and
// description for wii/wad games // description for wii/wad games
InsertColumn(COLUMN_NOTES, _("Notes")); InsertColumn(COLUMN_NOTES, _("Notes"));
InsertColumn(COLUMN_COUNTRY, _T("")); InsertColumn(COLUMN_COUNTRY, "");
InsertColumn(COLUMN_SIZE, _("Size")); InsertColumn(COLUMN_SIZE, _("Size"));
InsertColumn(COLUMN_EMULATION_STATE, _("State")); InsertColumn(COLUMN_EMULATION_STATE, _("State"));
@ -1190,16 +1190,16 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
{ {
wxString FileType; wxString FileType;
if (iso->GetPlatform() == GameListItem::WII_DISC) if (iso->GetPlatform() == GameListItem::WII_DISC)
FileType = _("All Wii ISO files (iso)") + wxString(wxT("|*.iso")); FileType = _("All Wii ISO files (iso)") + "|*.iso";
else else
FileType = _("All Gamecube GCM files (gcm)") + wxString(wxT("|*.gcm")); FileType = _("All Gamecube GCM files (gcm)") + "|*.gcm";
path = wxFileSelector( path = wxFileSelector(
_("Save decompressed GCM/ISO"), _("Save decompressed GCM/ISO"),
StrToWxStr(FilePath), StrToWxStr(FilePath),
StrToWxStr(FileName) + FileType.After('*'), StrToWxStr(FileName) + FileType.After('*'),
wxEmptyString, wxEmptyString,
FileType + wxT("|") + wxGetTranslation(wxALL_FILES), FileType + "|" + wxGetTranslation(wxALL_FILES),
wxFD_SAVE, wxFD_SAVE,
this); this);
} }
@ -1208,10 +1208,10 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
path = wxFileSelector( path = wxFileSelector(
_("Save compressed GCM/ISO"), _("Save compressed GCM/ISO"),
StrToWxStr(FilePath), StrToWxStr(FilePath),
StrToWxStr(FileName) + _T(".gcz"), StrToWxStr(FileName) + ".gcz",
wxEmptyString, wxEmptyString,
_("All compressed GC/Wii ISO files (gcz)") + _("All compressed GC/Wii ISO files (gcz)") +
wxString::Format(wxT("|*.gcz|%s"), wxGetTranslation(wxALL_FILES)), wxString::Format("|*.gcz|%s", wxGetTranslation(wxALL_FILES)),
wxFD_SAVE, wxFD_SAVE,
this); this);
} }
@ -1325,7 +1325,7 @@ void CGameListCtrl::OnDropFiles(wxDropFilesEvent& event)
} }
if (Movie::PlayInput(WxStrToStr(file.GetFullPath()))) if (Movie::PlayInput(WxStrToStr(file.GetFullPath())))
main_frame->BootGame(std::string("")); main_frame->BootGame("");
} }
else if (!Core::IsRunning()) else if (!Core::IsRunning())
{ {

View File

@ -141,7 +141,7 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
// add codes to info listbox // add codes to info listbox
for (const GeckoCode::Code& code : m_gcodes[sel].codes) for (const GeckoCode::Code& code : m_gcodes[sel].codes)
{ {
m_infobox.listbox_codes->Append(wxString::Format(wxT("%08X %08X"), code.address, code.data)); m_infobox.listbox_codes->Append(wxString::Format("%08X %08X", code.address, code.data));
} }
} }
else else

View File

@ -160,7 +160,7 @@ void HotkeyConfigDialog::DoGetButtons(int _GetId)
// Current time // Current time
int TmpTime = Seconds - (GetButtonWaitingTimer / TimesPerSecond); int TmpTime = Seconds - (GetButtonWaitingTimer / TimesPerSecond);
// Update text // Update text
SetButtonText(_GetId, wxString::Format(wxT("[ %d ]"), TmpTime)); SetButtonText(_GetId, wxString::Format("[ %d ]", TmpTime));
} }
// Time's up // Time's up

View File

@ -258,11 +258,11 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
m_Lang->Disable(); m_Lang->Disable();
} }
wxString temp = _T("0x") + StrToWxStr(OpenISO->GetMakerID()); wxString temp = "0x" + StrToWxStr(OpenISO->GetMakerID());
m_MakerID->SetValue(temp); m_MakerID->SetValue(temp);
m_Revision->SetValue(wxString::Format(wxT("%u"), OpenISO->GetRevision())); m_Revision->SetValue(wxString::Format("%u", OpenISO->GetRevision()));
m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate())); m_Date->SetValue(StrToWxStr(OpenISO->GetApploaderDate()));
m_FST->SetValue(wxString::Format(wxT("%u"), OpenISO->GetFSTSize())); m_FST->SetValue(wxString::Format("%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
if (!IsWad) if (!IsWad)
@ -677,7 +677,7 @@ void CISOProperties::OnBannerImageSave(wxCommandEvent& WXUNUSED (event))
{ {
wxString dirHome; wxString dirHome;
wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format(wxT("%s.png"), m_GameID->GetLabel().c_str()), wxFileDialog dialog(this, _("Save as..."), wxGetHomeDir(&dirHome), wxString::Format("%s.png", m_GameID->GetLabel().c_str()),
wxALL_FILES_PATTERN, wxFD_SAVE|wxFD_OVERWRITE_PROMPT); wxALL_FILES_PATTERN, wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
@ -745,7 +745,7 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem()) while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem())
{ {
wxString temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); wxString temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection()));
File = temp + wxT(DIR_SEP_CHR) + File; File = temp + DIR_SEP_CHR + File;
m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection()));
} }
@ -818,7 +818,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
// Extraction // Extraction
for (u32 i = index[0]; i < index[1]; i++) for (u32 i = index[0]; i < index[1]; i++)
{ {
dialog.SetTitle(wxString::Format(wxT("%s : %d%%"), dialogTitle.c_str(), dialog.SetTitle(wxString::Format("%s : %d%%", dialogTitle.c_str(),
(u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100))); (u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100)));
dialog.Update(i, wxString::Format(_("Extracting %s"), StrToWxStr(fst[i]->m_FullPath))); dialog.Update(i, wxString::Format(_("Extracting %s"), StrToWxStr(fst[i]->m_FullPath)));
@ -882,7 +882,7 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem()) while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem())
{ {
wxString temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); wxString temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection()));
Directory = temp + wxT(DIR_SEP_CHR) + Directory; Directory = temp + DIR_SEP_CHR + Directory;
m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection()));
} }
@ -1164,10 +1164,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
[NSString stringWithUTF8String: filename.c_str()] [NSString stringWithUTF8String: filename.c_str()]
withApplication: @"TextEdit"]; withApplication: @"TextEdit"];
#else #else
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("ini")); wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension("ini");
if (filetype == nullptr) // From extension failed, trying with MIME type now if (filetype == nullptr) // From extension failed, trying with MIME type now
{ {
filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain")); filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain");
if (filetype == nullptr) // MIME type failed, aborting mission if (filetype == nullptr) // MIME type failed, aborting mission
{ {
PanicAlertT("Filetype 'ini' is unknown! Will not open!"); PanicAlertT("Filetype 'ini' is unknown! Will not open!");
@ -1409,7 +1409,7 @@ void CISOProperties::ActionReplayList_Save()
lines.push_back("$" + code.name); lines.push_back("$" + code.name);
for (const ActionReplay::AREntry& op : code.ops) for (const ActionReplay::AREntry& op : code.ops)
{ {
lines.push_back(WxStrToStr(wxString::Format(wxT("%08X %08X"), op.cmd_addr, op.value))); lines.push_back(WxStrToStr(wxString::Format("%08X %08X", op.cmd_addr, op.value)));
} }
} }
++index; ++index;

View File

@ -172,7 +172,7 @@ ControlDialog::ControlDialog(GamepadPage* const parent, InputPlugin& plugin, Con
} }
ControlButton::ControlButton(wxWindow* const parent, ControllerInterface::ControlReference* const _ref, const unsigned int width, const std::string& label) ControlButton::ControlButton(wxWindow* const parent, ControllerInterface::ControlReference* const _ref, const unsigned int width, const std::string& label)
: wxButton(parent, -1, wxT(""), wxDefaultPosition, wxSize(width,20)) : wxButton(parent, -1, "", wxDefaultPosition, wxSize(width,20))
, control_reference(_ref) , control_reference(_ref)
{ {
if (label.empty()) if (label.empty())
@ -267,10 +267,10 @@ void ControlDialog::UpdateGUI()
switch (control_reference->parse_error) switch (control_reference->parse_error)
{ {
case EXPRESSION_PARSE_SYNTAX_ERROR: case EXPRESSION_PARSE_SYNTAX_ERROR:
m_error_label->SetLabel("Syntax error"); m_error_label->SetLabel(_("Syntax error"));
break; break;
case EXPRESSION_PARSE_NO_DEVICE: case EXPRESSION_PARSE_NO_DEVICE:
m_error_label->SetLabel("Device not found"); m_error_label->SetLabel(_("Device not found"));
break; break;
default: default:
m_error_label->SetLabel(""); m_error_label->SetLabel("");
@ -609,8 +609,8 @@ wxStaticBoxSizer* ControlDialog::CreateControlChooser(GamepadPage* const parent)
range_slider->Bind(wxEVT_SCROLL_CHANGED, &GamepadPage::AdjustControlOption, parent); range_slider->Bind(wxEVT_SCROLL_CHANGED, &GamepadPage::AdjustControlOption, parent);
wxStaticText* const range_label = new wxStaticText(this, -1, _("Range")); wxStaticText* const range_label = new wxStaticText(this, -1, _("Range"));
m_bound_label = new wxStaticText(this, -1, wxT("")); m_bound_label = new wxStaticText(this, -1, "");
m_error_label = new wxStaticText(this, -1, wxT("")); m_error_label = new wxStaticText(this, -1, "");
wxBoxSizer* const range_sizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* const range_sizer = new wxBoxSizer(wxHORIZONTAL);
range_sizer->Add(range_label, 0, wxCENTER|wxLEFT, 5); range_sizer->Add(range_label, 0, wxCENTER|wxLEFT, 5);
@ -963,7 +963,7 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i
wxStaticBoxSizer* const device_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Device")); wxStaticBoxSizer* const device_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Device"));
device_cbox = new wxComboBox(this, -1, wxT(""), wxDefaultPosition, wxSize(64,-1)); device_cbox = new wxComboBox(this, -1, "", wxDefaultPosition, wxSize(64,-1));
device_cbox->ToggleWindowStyle(wxTE_PROCESS_ENTER); device_cbox->ToggleWindowStyle(wxTE_PROCESS_ENTER);
wxButton* refresh_button = new wxButton(this, -1, _("Refresh"), wxDefaultPosition, wxSize(60,-1)); wxButton* refresh_button = new wxButton(this, -1, _("Refresh"), wxDefaultPosition, wxSize(60,-1));
@ -985,7 +985,7 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i
clearall_button->Bind(wxEVT_BUTTON, &GamepadPage::ClearAll, this); clearall_button->Bind(wxEVT_BUTTON, &GamepadPage::ClearAll, this);
default_button->Bind(wxEVT_BUTTON, &GamepadPage::LoadDefaults, this); default_button->Bind(wxEVT_BUTTON, &GamepadPage::LoadDefaults, this);
profile_cbox = new wxComboBox(this, -1, wxT(""), wxDefaultPosition, wxSize(64,-1)); profile_cbox = new wxComboBox(this, -1, "", wxDefaultPosition, wxSize(64,-1));
wxButton* const pload_btn = new wxButton(this, -1, _("Load"), wxDefaultPosition, wxSize(48,-1)); wxButton* const pload_btn = new wxButton(this, -1, _("Load"), wxDefaultPosition, wxSize(48,-1));
wxButton* const psave_btn = new wxButton(this, -1, _("Save"), wxDefaultPosition, wxSize(48,-1)); wxButton* const psave_btn = new wxButton(this, -1, _("Save"), wxDefaultPosition, wxSize(48,-1));
@ -1026,7 +1026,7 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin
{ {
GamepadPage* gp = new GamepadPage(m_pad_notebook, m_plugin, i, this); GamepadPage* gp = new GamepadPage(m_pad_notebook, m_plugin, i, this);
m_padpages.push_back(gp); m_padpages.push_back(gp);
m_pad_notebook->AddPage(gp, wxString::Format(wxT("%s %u"), wxGetTranslation(StrToWxStr(m_plugin.gui_name)), 1+i)); m_pad_notebook->AddPage(gp, wxString::Format("%s %u", wxGetTranslation(StrToWxStr(m_plugin.gui_name)), 1+i));
} }
m_pad_notebook->SetSelection(tab_num); m_pad_notebook->SetSelection(tab_num);

View File

@ -116,8 +116,8 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event))
if (GROUP_TYPE_STICK == g->control_group->type) if (GROUP_TYPE_STICK == g->control_group->type)
{ {
// outline and fill colors // outline and fill colors
wxBrush LightGrayBrush(_T("#dddddd")); wxBrush LightGrayBrush("#dddddd");
wxPen LightGrayPen(_T("#bfbfbf")); wxPen LightGrayPen("#bfbfbf");
dc.SetBrush(LightGrayBrush); dc.SetBrush(LightGrayBrush);
dc.SetPen(LightGrayPen); dc.SetPen(LightGrayPen);
@ -273,7 +273,7 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event))
else else
{ {
unsigned char amt = 255 - g->control_group->controls[n]->control_ref->State() * 128; unsigned char amt = 255 - g->control_group->controls[n]->control_ref->State() * 128;
dc.SetBrush(wxBrush(wxColor(amt, amt, amt))); dc.SetBrush(wxBrush(wxColour(amt, amt, amt)));
} }
dc.DrawRectangle(n * 12, 0, 14, 12); dc.DrawRectangle(n * 12, 0, 14, 12);
@ -391,7 +391,7 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event))
// box outline // box outline
// Windows XP color // Windows XP color
dc.SetPen(wxPen(_T("#7f9db9"))); dc.SetPen(wxPen("#7f9db9"));
dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawRectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight()); dc.DrawRectangle(0, 0, bitmap.GetWidth(), bitmap.GetHeight());

View File

@ -127,7 +127,7 @@ void CLogWindow::CreateGUIControls()
m_FontChoice->Append(_("Selected font")); m_FontChoice->Append(_("Selected font"));
DefaultFont = GetFont(); DefaultFont = GetFont();
MonoSpaceFont.SetNativeFontInfoUserDesc(_T("lucida console windows-1252")); MonoSpaceFont.SetNativeFontInfoUserDesc("lucida console windows-1252");
LogFont.push_back(DefaultFont); LogFont.push_back(DefaultFont);
LogFont.push_back(MonoSpaceFont); LogFont.push_back(MonoSpaceFont);
LogFont.push_back(DebuggerFont); LogFont.push_back(DebuggerFont);
@ -312,7 +312,7 @@ void CLogWindow::UpdateLog()
break; break;
case WARNING_LEVEL: case WARNING_LEVEL:
m_Log->SetDefaultStyle(wxTextAttr(wxColour(255, 255, 0))); // YELLOW m_Log->SetDefaultStyle(wxTextAttr(*wxYELLOW));
break; break;
case NOTICE_LEVEL: case NOTICE_LEVEL:

View File

@ -215,17 +215,15 @@ bool DolphinApp::OnInit()
return false; return false;
} }
UseDebugger = parser.Found(wxT("debugger")); UseDebugger = parser.Found("debugger");
UseLogger = parser.Found(wxT("logger")); UseLogger = parser.Found("logger");
LoadFile = parser.Found(wxT("exec"), &FileToLoad); LoadFile = parser.Found("exec", &FileToLoad);
BatchMode = parser.Found(wxT("batch")); BatchMode = parser.Found("batch");
selectVideoBackend = parser.Found(wxT("video_backend"), selectVideoBackend = parser.Found("video_backend", &videoBackendName);
&videoBackendName); selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName);
selectAudioEmulation = parser.Found(wxT("audio_emulation"), playMovie = parser.Found("movie", &movieFile);
&audioEmulationName);
playMovie = parser.Found(wxT("movie"), &movieFile);
if (parser.Found(wxT("user"), &userPath)) if (parser.Found("user", &userPath))
{ {
File::CreateFullPath(WxStrToStr(userPath) + DIR_SEP); File::CreateFullPath(WxStrToStr(userPath) + DIR_SEP);
File::GetUserPath(D_USER_IDX, userPath.ToStdString() + DIR_SEP); File::GetUserPath(D_USER_IDX, userPath.ToStdString() + DIR_SEP);
@ -426,7 +424,7 @@ void DolphinApp::InitLanguageSupport()
m_locale->AddCatalogLookupPathPrefix(StrToWxStr(File::GetExeDirectory() + DIR_SEP "Languages")); m_locale->AddCatalogLookupPathPrefix(StrToWxStr(File::GetExeDirectory() + DIR_SEP "Languages"));
#endif #endif
m_locale->AddCatalog(wxT("dolphin-emu")); m_locale->AddCatalog("dolphin-emu");
if (!m_locale->IsOk()) if (!m_locale->IsOk())
{ {
@ -497,7 +495,7 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
else else
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PANIC); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PANIC);
event.SetString(StrToWxStr(caption) + wxT(":") + StrToWxStr(text)); event.SetString(StrToWxStr(caption) + ":" + StrToWxStr(text));
event.SetInt(yes_no); event.SetInt(yes_no);
main_frame->GetEventHandler()->AddPendingEvent(event); main_frame->GetEventHandler()->AddPendingEvent(event);
main_frame->panic_event.Wait(); main_frame->panic_event.Wait();

View File

@ -34,7 +34,7 @@
#include "DolphinWX/MemcardManager.h" #include "DolphinWX/MemcardManager.h"
#include "DolphinWX/WxUtils.h" #include "DolphinWX/WxUtils.h"
#define ARROWS slot ? _T("") : ARROW[slot], slot ? ARROW[slot] : _T("") #define ARROWS slot ? "" : ARROW[slot], slot ? ARROW[slot] : ""
const u8 hdr[] = { const u8 hdr[] = {
0x42,0x4D, 0x42,0x4D,
@ -197,7 +197,7 @@ void CMemcardManager::CreateGUIControls()
{ {
// Create the controls for both memcards // Create the controls for both memcards
const wxChar* ARROW[2] = {_T("<-"), _T("->")}; const char* ARROW[2] = { "<-", "->" };
m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, _("Convert to GCI")); m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, _("Convert to GCI"));
@ -228,14 +228,14 @@ void CMemcardManager::CreateGUIControls()
m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot, m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot,
StrToWxStr(File::GetUserPath(D_GCUSER_IDX)), _("Choose a memory card:"), StrToWxStr(File::GetUserPath(D_GCUSER_IDX)), _("Choose a memory card:"),
_("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp")), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN); _("Gamecube Memory Cards (*.raw,*.gcp)") + wxString("|*.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),
wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL, mcmSettings); wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL, mcmSettings);
m_MemcardList[slot]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL); m_MemcardList[slot]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL);
sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(wxT(" %c"), 'A' + slot)); sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(" %c", 'A' + slot));
sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND|wxALL, 5); sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND|wxALL, 5);
sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND|wxALL, 5); sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND|wxALL, 5);
sMemcard[slot]->Add(sPages, 0, wxEXPAND|wxALL, 1); sMemcard[slot]->Add(sPages, 0, wxEXPAND|wxALL, 1);
@ -429,7 +429,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
if (slot != -1) if (slot != -1)
{ {
memoryCard[slot]->FixChecksums(); memoryCard[slot]->FixChecksums();
if (!memoryCard[slot]->Save()) PanicAlert(E_SAVEFAILED); if (!memoryCard[slot]->Save()) PanicAlertT(E_SAVEFAILED);
page[slot] = FIRSTPAGE; page[slot] = FIRSTPAGE;
ReloadMemcard(WxStrToStr(m_MemcardPath[slot]->GetPath()), slot); ReloadMemcard(WxStrToStr(m_MemcardPath[slot]->GetPath()), slot);
} }
@ -443,7 +443,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
case OUTOFBLOCKS: case OUTOFBLOCKS:
if (slot == -1) if (slot == -1)
{ {
PanicAlert(E_UNK); PanicAlertT(E_UNK);
break; break;
} }
PanicAlertT("Only %d blocks available", memoryCard[slot]->GetFreeBlocks()); PanicAlertT("Only %d blocks available", memoryCard[slot]->GetFreeBlocks());
@ -475,14 +475,14 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
PanicAlertT("Invalid bat.map or dir entry"); PanicAlertT("Invalid bat.map or dir entry");
break; break;
case WRITEFAIL: case WRITEFAIL:
PanicAlert(E_SAVEFAILED); PanicAlertT(E_SAVEFAILED);
break; break;
case DELETE_FAIL: case DELETE_FAIL:
PanicAlertT("Order of files in the File Directory do not match the block order\n" PanicAlertT("Order of files in the File Directory do not match the block order\n"
"Right click and export all of the saves,\nand import the saves to a new memcard\n"); "Right click and export all of the saves,\nand import the saves to a new memcard\n");
break; break;
default: default:
PanicAlert(E_UNK); PanicAlertT(E_UNK);
break; break;
} }
SetFocus(); SetFocus();
@ -523,7 +523,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
} }
else else
{ {
PanicAlert(E_SAVEFAILED); PanicAlertT(E_SAVEFAILED);
} }
break; break;
case ID_CONVERTTOGCI: case ID_CONVERTTOGCI:
@ -538,16 +538,16 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
? StrToWxStr("") ? StrToWxStr("")
: StrToWxStr(DefaultIOPath), : StrToWxStr(DefaultIOPath),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
_("GameCube Savegame files(*.gci;*.gcs;*.sav)") + wxString(wxT("|*.gci;*.gcs;*.sav|")) + _("GameCube Savegame files(*.gci;*.gcs;*.sav)") + wxString("|*.gci;*.gcs;*.sav|") +
_("Native GCI files(*.gci)") + wxString(wxT("|*.gci|")) + _("Native GCI files(*.gci)") + wxString("|*.gci|") +
_("MadCatz Gameshark files(*.gcs)") + wxString(wxT("|*.gcs|")) + _("MadCatz Gameshark files(*.gcs)") + wxString("|*.gcs|") +
_("Datel MaxDrive/Pro files(*.sav)") + wxString(wxT("|*.sav")), _("Datel MaxDrive/Pro files(*.sav)") + wxString("|*.sav"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST, this); wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
if (!fileName.empty() && !fileName2.empty()) if (!fileName.empty() && !fileName2.empty())
{ {
wxString temp2 = wxFileSelector(_("Save GCI as..."), wxString temp2 = wxFileSelector(_("Save GCI as..."),
wxEmptyString, wxEmptyString, wxT(".gci"), wxEmptyString, wxEmptyString, ".gci",
_("GCI File(*.gci)") + wxString(_T("|*.gci")), _("GCI File(*.gci)") + wxString("|*.gci"),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this); wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this);
if (temp2.empty()) if (temp2.empty())
@ -571,16 +571,16 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
std::string gciFilename; std::string gciFilename;
if (!memoryCard[slot]->GCI_FileName(index, gciFilename)) if (!memoryCard[slot]->GCI_FileName(index, gciFilename))
{ {
PanicAlert("Invalid index"); PanicAlertT("Invalid index");
return; return;
} }
wxString fileName = wxFileSelector( wxString fileName = wxFileSelector(
_("Export save as..."), _("Export save as..."),
StrToWxStr(DefaultIOPath), StrToWxStr(DefaultIOPath),
StrToWxStr(gciFilename), wxT(".gci"), StrToWxStr(gciFilename), ".gci",
_("Native GCI files(*.gci)") + wxString(wxT("|*.gci|")) + _("Native GCI files(*.gci)") + wxString("|*.gci|") +
_("MadCatz Gameshark files(*.gcs)") + wxString(wxT("|*.gcs|")) + _("MadCatz Gameshark files(*.gcs)") + wxString("|*.gcs|") +
_("Datel MaxDrive/Pro files(*.sav)") + wxString(wxT("|*.sav")), _("Datel MaxDrive/Pro files(*.sav)") + wxString("|*.sav"),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this); wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this);
if (fileName.length() > 0) if (fileName.length() > 0)
@ -741,11 +741,11 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card)
if (blocks == 0xFFFF) if (blocks == 0xFFFF)
blocks = 0; blocks = 0;
wxBlock.Printf(wxT("%10d"), blocks); wxBlock.Printf("%10d", blocks);
m_MemcardList[card]->SetItem(index,COLUMN_BLOCKS, wxBlock); m_MemcardList[card]->SetItem(index,COLUMN_BLOCKS, wxBlock);
firstblock = memoryCard[card]->DEntry_FirstBlock(fileIndex); firstblock = memoryCard[card]->DEntry_FirstBlock(fileIndex);
//if (firstblock == 0xFFFF) firstblock = 3; // to make firstblock -1 //if (firstblock == 0xFFFF) firstblock = 3; // to make firstblock -1
wxFirstBlock.Printf(wxT("%15d"), firstblock); wxFirstBlock.Printf("%15d", firstblock);
m_MemcardList[card]->SetItem(index, COLUMN_FIRSTBLOCK, wxFirstBlock); m_MemcardList[card]->SetItem(index, COLUMN_FIRSTBLOCK, wxFirstBlock);
m_MemcardList[card]->SetItem(index, COLUMN_ICON, wxEmptyString); m_MemcardList[card]->SetItem(index, COLUMN_ICON, wxEmptyString);

View File

@ -38,7 +38,7 @@ class CMemcardManager : public wxDialog
{ {
public: public:
CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxGetTranslation(wxT(MEMCARDMAN_TITLE)), CMemcardManager(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = wxGetTranslation(MEMCARDMAN_TITLE),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE); const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = MEMCARD_MANAGER_STYLE);
virtual ~CMemcardManager(); virtual ~CMemcardManager();

View File

@ -610,7 +610,7 @@ void CWiiSaveCrypted::ScanForFiles(std::string savDir, std::vector<std::string>&
{ {
if ((elem.virtualName == "nocopy") || elem.virtualName == "nomove") if ((elem.virtualName == "nocopy") || elem.virtualName == "nomove")
{ {
PanicAlert("This save will likely require homebrew tools to copy to a real wii"); PanicAlertT("This save will likely require homebrew tools to copy to a real Wii.");
} }
Directories.push_back(elem.physicalName); Directories.push_back(elem.physicalName);

View File

@ -81,7 +81,7 @@ void FillWithGameNames(wxListBox* game_lbox, const CGameListCtrl& game_list)
} }
NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* const game_list) NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl* const game_list)
: wxFrame(parent, wxID_ANY, wxT(NETPLAY_TITLEBAR)) : wxFrame(parent, wxID_ANY, NETPLAY_TITLEBAR)
, m_game_list(game_list) , m_game_list(game_list)
{ {
IniFile inifile; IniFile inifile;
@ -309,7 +309,7 @@ void NetPlaySetupDiag::OnQuit(wxCommandEvent&)
NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game_list, NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game_list,
const std::string& game, const bool is_hosting) const std::string& game, const bool is_hosting)
: wxFrame(parent, wxID_ANY, wxT(NETPLAY_TITLEBAR)) : wxFrame(parent, wxID_ANY, NETPLAY_TITLEBAR)
, m_selected_game(game) , m_selected_game(game)
, m_start_btn(nullptr) , m_start_btn(nullptr)
, m_game_list(game_list) , m_game_list(game_list)
@ -375,7 +375,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game
bottom_szr->Add(m_start_btn); bottom_szr->Add(m_start_btn);
bottom_szr->Add(new wxStaticText(panel, wxID_ANY, _("Buffer:")), 0, wxLEFT | wxCENTER, 5 ); bottom_szr->Add(new wxStaticText(panel, wxID_ANY, _("Buffer:")), 0, wxLEFT | wxCENTER, 5 );
wxSpinCtrl* const padbuf_spin = new wxSpinCtrl(panel, wxID_ANY, wxT("20") wxSpinCtrl* const padbuf_spin = new wxSpinCtrl(panel, wxID_ANY, "20"
, wxDefaultPosition, wxSize(64, -1), wxSP_ARROW_KEYS, 0, 200, INITIAL_PAD_BUFFER_SIZE); , wxDefaultPosition, wxSize(64, -1), wxSP_ARROW_KEYS, 0, 200, INITIAL_PAD_BUFFER_SIZE);
padbuf_spin->Bind(wxEVT_SPINCTRL, &NetPlayDiag::OnAdjustBuffer, this); padbuf_spin->Bind(wxEVT_SPINCTRL, &NetPlayDiag::OnAdjustBuffer, this);
bottom_szr->Add(padbuf_spin, 0, wxCENTER); bottom_szr->Add(padbuf_spin, 0, wxCENTER);
@ -426,7 +426,7 @@ void NetPlayDiag::OnChat(wxCommandEvent&)
if (s.Length()) if (s.Length())
{ {
netplay_client->SendChatMessage(WxStrToStr(s)); netplay_client->SendChatMessage(WxStrToStr(s));
m_chat_text->AppendText(s.Prepend(wxT(" >> ")).Append(wxT('\n'))); m_chat_text->AppendText(s.Prepend(" >> ").Append('\n'));
m_chat_msg_text->Clear(); m_chat_msg_text->Clear();
} }
} }
@ -520,7 +520,7 @@ void NetPlayDiag::OnAdjustBuffer(wxCommandEvent& event)
std::ostringstream ss; std::ostringstream ss;
ss << "< Pad Buffer: " << val << " >"; ss << "< Pad Buffer: " << val << " >";
netplay_client->SendChatMessage(ss.str()); netplay_client->SendChatMessage(ss.str());
m_chat_text->AppendText(StrToWxStr(ss.str()).Append(wxT('\n'))); m_chat_text->AppendText(StrToWxStr(ss.str()).Append('\n'));
} }
void NetPlayDiag::OnQuit(wxCommandEvent&) void NetPlayDiag::OnQuit(wxCommandEvent&)
@ -574,7 +574,7 @@ void NetPlayDiag::OnThread(wxCommandEvent& event)
std::string s; std::string s;
chat_msgs.Pop(s); chat_msgs.Pop(s);
//PanicAlert("message: %s", s.c_str()); //PanicAlert("message: %s", s.c_str());
m_chat_text->AppendText(StrToWxStr(s).Append(wxT('\n'))); m_chat_text->AppendText(StrToWxStr(s).Append('\n'));
} }
} }
@ -655,7 +655,7 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim
for (unsigned int i=0; i<4; ++i) for (unsigned int i=0; i<4; ++i)
{ {
wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL); wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL);
v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Pad ")) + (wxChar)(wxT('0')+i))), v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Pad ")) + (wxChar)('0'+i))),
1, wxALIGN_CENTER_HORIZONTAL); 1, wxALIGN_CENTER_HORIZONTAL);
m_map_cbox[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names); m_map_cbox[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names);
@ -676,7 +676,7 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim
for (unsigned int i=0; i<4; ++i) for (unsigned int i=0; i<4; ++i)
{ {
wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL); wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL);
v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Wiimote ")) + (wxChar)(wxT('0')+i))), v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Wiimote ")) + (wxChar)('0'+i))),
1, wxALIGN_CENTER_HORIZONTAL); 1, wxALIGN_CENTER_HORIZONTAL);
m_map_cbox[i+4] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names); m_map_cbox[i+4] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names);

View File

@ -72,7 +72,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
EditPatchName->SetValue(currentName); EditPatchName->SetValue(currentName);
wxStaticText* EditPatchOffsetText = new wxStaticText(this, ID_EDITPATCH_OFFSET_TEXT, _("Offset:")); wxStaticText* EditPatchOffsetText = new wxStaticText(this, ID_EDITPATCH_OFFSET_TEXT, _("Offset:"));
EditPatchOffset = new wxTextCtrl(this, ID_EDITPATCH_OFFSET); EditPatchOffset = new wxTextCtrl(this, ID_EDITPATCH_OFFSET);
EditPatchOffset->SetValue(wxString::Format(wxT("%08X"), tempEntries.at(0).address)); EditPatchOffset->SetValue(wxString::Format("%08X", tempEntries.at(0).address));
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT); EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT);
EntrySelection->SetRange(0, (int)tempEntries.size()-1); EntrySelection->SetRange(0, (int)tempEntries.size()-1);
EntrySelection->SetValue((int)tempEntries.size()-1); EntrySelection->SetValue((int)tempEntries.size()-1);
@ -83,7 +83,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
EditPatchType->SetSelection((int)tempEntries.at(0).type); EditPatchType->SetSelection((int)tempEntries.at(0).type);
wxStaticText* EditPatchValueText = new wxStaticText(this, ID_EDITPATCH_VALUE_TEXT, _("Value:")); wxStaticText* EditPatchValueText = new wxStaticText(this, ID_EDITPATCH_VALUE_TEXT, _("Value:"));
EditPatchValue = new wxTextCtrl(this, ID_EDITPATCH_VALUE); EditPatchValue = new wxTextCtrl(this, ID_EDITPATCH_VALUE);
EditPatchValue->SetValue(wxString::Format(wxT("%0*X"), PatchEngine::GetPatchTypeCharLength(tempEntries.at(0).type), tempEntries.at(0).value)); EditPatchValue->SetValue(wxString::Format("%0*X", PatchEngine::GetPatchTypeCharLength(tempEntries.at(0).type), tempEntries.at(0).value));
wxButton *EntryAdd = new wxButton(this, ID_ENTRY_ADD, _("Add")); wxButton *EntryAdd = new wxButton(this, ID_ENTRY_ADD, _("Add"));
EntryRemove = new wxButton(this, ID_ENTRY_REMOVE, _("Remove")); EntryRemove = new wxButton(this, ID_ENTRY_REMOVE, _("Remove"));
if ((int)tempEntries.size() <= 1) if ((int)tempEntries.size() <= 1)
@ -201,9 +201,9 @@ void CPatchAddEdit::UpdateEntryCtrls(PatchEngine::PatchEntry pE)
{ {
sbEntry->GetStaticBox()->SetLabel(wxString::Format(_("Entry %d/%d"), currentItem, sbEntry->GetStaticBox()->SetLabel(wxString::Format(_("Entry %d/%d"), currentItem,
(int)tempEntries.size())); (int)tempEntries.size()));
EditPatchOffset->SetValue(wxString::Format(wxT("%08X"), pE.address)); EditPatchOffset->SetValue(wxString::Format("%08X", pE.address));
EditPatchType->SetSelection(pE.type); EditPatchType->SetSelection(pE.type);
EditPatchValue->SetValue(wxString::Format(wxT("%0*X"), EditPatchValue->SetValue(wxString::Format("%0*X",
PatchEngine::GetPatchTypeCharLength(pE.type), pE.value)); PatchEngine::GetPatchTypeCharLength(pE.type), pE.value));
} }

View File

@ -67,11 +67,11 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
static_bitmap_main->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); static_bitmap_main->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this);
wx_mainX_s = new wxSlider(this, ID_MAIN_X_SLIDER, 128, 0, 255); wx_mainX_s = new wxSlider(this, ID_MAIN_X_SLIDER, 128, 0, 255);
wx_mainX_s->SetMinSize(wxSize(120,-1)); wx_mainX_s->SetMinSize(wxSize(120,-1));
wx_mainX_t = new wxTextCtrl(this, ID_MAIN_X_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); wx_mainX_t = new wxTextCtrl(this, ID_MAIN_X_TEXT, "128", wxDefaultPosition, wxSize(40, 20));
wx_mainX_t->SetMaxLength(3); wx_mainX_t->SetMaxLength(3);
wx_mainY_s = new wxSlider(this, ID_MAIN_Y_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_mainY_s = new wxSlider(this, ID_MAIN_Y_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
wx_mainY_s->SetMinSize(wxSize(-1,120)); wx_mainY_s->SetMinSize(wxSize(-1,120));
wx_mainY_t = new wxTextCtrl(this, ID_MAIN_Y_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); wx_mainY_t = new wxTextCtrl(this, ID_MAIN_Y_TEXT, "128", wxDefaultPosition, wxSize(40, 20));
wx_mainY_t->SetMaxLength(3); wx_mainY_t->SetMaxLength(3);
main_xslider_box->Add(wx_mainX_s, 0, wxALIGN_TOP); main_xslider_box->Add(wx_mainX_s, 0, wxALIGN_TOP);
@ -94,11 +94,11 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
static_bitmap_c->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); static_bitmap_c->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this);
wx_cX_s = new wxSlider(this, ID_C_X_SLIDER, 128, 0, 255); wx_cX_s = new wxSlider(this, ID_C_X_SLIDER, 128, 0, 255);
wx_cX_s->SetMinSize(wxSize(120,-1)); wx_cX_s->SetMinSize(wxSize(120,-1));
wx_cX_t = new wxTextCtrl(this, ID_C_X_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); wx_cX_t = new wxTextCtrl(this, ID_C_X_TEXT, "128", wxDefaultPosition, wxSize(40, 20));
wx_cX_t->SetMaxLength(3); wx_cX_t->SetMaxLength(3);
wx_cY_s = new wxSlider(this, ID_C_Y_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_cY_s = new wxSlider(this, ID_C_Y_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
wx_cY_s->SetMinSize(wxSize(-1,120)); wx_cY_s->SetMinSize(wxSize(-1,120));
wx_cY_t = new wxTextCtrl(this, ID_C_Y_TEXT, wxT("128"), wxDefaultPosition, wxSize(40, 20)); wx_cY_t = new wxTextCtrl(this, ID_C_Y_TEXT, "128", wxDefaultPosition, wxSize(40, 20));
wx_cY_t->SetMaxLength(3); wx_cY_t->SetMaxLength(3);
c_xslider_box->Add(wx_cX_s, 0, wxALIGN_TOP); c_xslider_box->Add(wx_cX_s, 0, wxALIGN_TOP);
@ -114,11 +114,11 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wx_l_s = new wxSlider(this, ID_L_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_l_s = new wxSlider(this, ID_L_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
wx_l_s->SetMinSize(wxSize(-1,100)); wx_l_s->SetMinSize(wxSize(-1,100));
wx_l_t = new wxTextCtrl(this, ID_L_TEXT, wxT("0"), wxDefaultPosition, wxSize(40, 20)); wx_l_t = new wxTextCtrl(this, ID_L_TEXT, "0", wxDefaultPosition, wxSize(40, 20));
wx_l_t->SetMaxLength(3); wx_l_t->SetMaxLength(3);
wx_r_s = new wxSlider(this, ID_R_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE); wx_r_s = new wxSlider(this, ID_R_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
wx_r_s->SetMinSize(wxSize(-1,100)); wx_r_s->SetMinSize(wxSize(-1,100));
wx_r_t = new wxTextCtrl(this, ID_R_TEXT, wxT("0"), wxDefaultPosition, wxSize(40, 20)); wx_r_t = new wxTextCtrl(this, ID_R_TEXT, "0", wxDefaultPosition, wxSize(40, 20));
wx_r_t->SetMaxLength(3); wx_r_t->SetMaxLength(3);
shoulder_box->Add(wx_l_s, 0, wxALIGN_CENTER_VERTICAL); shoulder_box->Add(wx_l_s, 0, wxALIGN_CENTER_VERTICAL);
@ -129,28 +129,28 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wxStaticBoxSizer* const buttons_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Buttons")); wxStaticBoxSizer* const buttons_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Buttons"));
wxGridSizer* const buttons_grid = new wxGridSizer(4); wxGridSizer* const buttons_grid = new wxGridSizer(4);
wx_a_button = new wxCheckBox(this,ID_A,_T("A")); wx_a_button = new wxCheckBox(this, ID_A, "A");
wx_a_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_a_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_a_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_a_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_b_button = new wxCheckBox(this,ID_B,_T("B")); wx_b_button = new wxCheckBox(this, ID_B, "B");
wx_b_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_b_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_b_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_b_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_x_button = new wxCheckBox(this,ID_X,_T("X")); wx_x_button = new wxCheckBox(this, ID_X, "X");
wx_x_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_x_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_x_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_x_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_y_button = new wxCheckBox(this,ID_Y,_T("Y")); wx_y_button = new wxCheckBox(this, ID_Y, "Y");
wx_y_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_y_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_y_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_y_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_l_button = new wxCheckBox(this,ID_L,_T("L")); wx_l_button = new wxCheckBox(this, ID_L, "L");
wx_l_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_l_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_l_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_l_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_r_button = new wxCheckBox(this,ID_R,_T("R")); wx_r_button = new wxCheckBox(this, ID_R, "R");
wx_r_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_r_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_r_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_r_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_z_button = new wxCheckBox(this,ID_Z,_T("Z")); wx_z_button = new wxCheckBox(this, ID_Z, "Z");
wx_z_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_z_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_z_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_z_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_start_button = new wxCheckBox(this,ID_START,_T("Start")); wx_start_button = new wxCheckBox(this, ID_START, "Start");
wx_start_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_start_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_start_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_start_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
@ -166,16 +166,16 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wxGridSizer* const buttons_dpad = new wxGridSizer(3); wxGridSizer* const buttons_dpad = new wxGridSizer(3);
wx_up_button = new wxCheckBox(this,ID_UP,_T("Up")); wx_up_button = new wxCheckBox(this, ID_UP, "Up");
wx_up_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_up_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_up_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_up_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_right_button = new wxCheckBox(this,ID_RIGHT,_T("Right")); wx_right_button = new wxCheckBox(this, ID_RIGHT, "Right");
wx_right_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_right_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_right_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_right_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_down_button = new wxCheckBox(this,ID_DOWN,_T("Down")); wx_down_button = new wxCheckBox(this, ID_DOWN, "Down");
wx_down_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_down_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_down_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_down_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
wx_left_button = new wxCheckBox(this,ID_LEFT,_T("Left")); wx_left_button = new wxCheckBox(this, ID_LEFT, "Left");
wx_left_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this); wx_left_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_left_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this); wx_left_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
@ -221,12 +221,12 @@ void TASInputDlg::ResetValues()
wx_l_s->SetValue(0); wx_l_s->SetValue(0);
wx_r_s->SetValue(0); wx_r_s->SetValue(0);
wx_mainX_t->SetValue(wxT("128")); wx_mainX_t->SetValue("128");
wx_mainY_t->SetValue(wxT("128")); wx_mainY_t->SetValue("128");
wx_cX_t->SetValue(wxT("128")); wx_cX_t->SetValue("128");
wx_cY_t->SetValue(wxT("128")); wx_cY_t->SetValue("128");
wx_l_t->SetValue(wxT("0")); wx_l_t->SetValue("0");
wx_r_t->SetValue(wxT("0")); wx_r_t->SetValue("0");
wx_up_button->SetValue(false); wx_up_button->SetValue(false);
wx_down_button->SetValue(false); wx_down_button->SetValue(false);
@ -248,53 +248,53 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
{ {
mainX = PadStatus->stickX; mainX = PadStatus->stickX;
mstickx = true; mstickx = true;
wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX)); wx_mainX_t->SetValue(wxString::Format("%i", mainX));
} }
else if (mstickx) else if (mstickx)
{ {
mstickx = false; mstickx = false;
mainX = 128; mainX = 128;
wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX)); wx_mainX_t->SetValue(wxString::Format("%i", mainX));
} }
if (PadStatus->stickY != 128) if (PadStatus->stickY != 128)
{ {
mainY = PadStatus->stickY; mainY = PadStatus->stickY;
msticky = true; msticky = true;
wx_mainY_t->SetValue(wxString::Format(wxT("%i"),mainY)); wx_mainY_t->SetValue(wxString::Format("%i",mainY));
} }
else if (msticky) else if (msticky)
{ {
msticky = false; msticky = false;
mainY = 128; mainY = 128;
wx_mainY_t->SetValue(wxString::Format(wxT("%i"), mainY)); wx_mainY_t->SetValue(wxString::Format("%i", mainY));
} }
if (PadStatus->substickX != 128) if (PadStatus->substickX != 128)
{ {
cX = PadStatus->substickX; cX = PadStatus->substickX;
cstickx = true; cstickx = true;
wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX)); wx_cX_t->SetValue(wxString::Format("%i", cX));
} }
else if (cstickx) else if (cstickx)
{ {
cstickx = false; cstickx = false;
cX = 128; cX = 128;
wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX)); wx_cX_t->SetValue(wxString::Format("%i", cX));
} }
if (PadStatus->substickY != 128) if (PadStatus->substickY != 128)
{ {
cY = PadStatus->substickY; cY = PadStatus->substickY;
csticky = true; csticky = true;
wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY)); wx_cY_t->SetValue(wxString::Format("%i", cY));
} }
else if (csticky) else if (csticky)
{ {
csticky = false; csticky = false;
cY = 128; cY = 128;
wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY)); wx_cY_t->SetValue(wxString::Format("%i", cY));
} }
if ((PadStatus->button & PAD_BUTTON_UP) != 0) if ((PadStatus->button & PAD_BUTTON_UP) != 0)
@ -399,14 +399,14 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
} }
wx_l_s->SetValue(PadStatus->triggerLeft); wx_l_s->SetValue(PadStatus->triggerLeft);
wx_l_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerLeft)); wx_l_t->SetValue(wxString::Format("%i", PadStatus->triggerLeft));
L_cont = true; L_cont = true;
} }
else if (L_cont) else if (L_cont)
{ {
wx_l_button->SetValue(false); wx_l_button->SetValue(false);
wx_l_s->SetValue(0); wx_l_s->SetValue(0);
wx_l_t->SetValue(wxT("0")); wx_l_t->SetValue("0");
L_cont = false; L_cont = false;
} }
@ -424,14 +424,14 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
} }
wx_r_s->SetValue(PadStatus->triggerRight); wx_r_s->SetValue(PadStatus->triggerRight);
wx_r_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerRight)); wx_r_t->SetValue(wxString::Format("%i", PadStatus->triggerRight));
R_cont = true; R_cont = true;
} }
else if (R_cont) else if (R_cont)
{ {
wx_r_button->SetValue(false); wx_r_button->SetValue(false);
wx_r_s->SetValue(0); wx_r_s->SetValue(0);
wx_r_t->SetValue(wxT("0")); wx_r_t->SetValue("0");
R_cont = false; R_cont = false;
} }
@ -614,7 +614,7 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
int value = ((wxSlider *) event.GetEventObject())->GetValue(); int value = ((wxSlider *) event.GetEventObject())->GetValue();
*v = (u8) value; *v = (u8) value;
text->SetValue(wxString::Format(wxT("%i"), value)); text->SetValue(wxString::Format("%i", value));
if (update == 1) if (update == 1)
{ {
@ -801,8 +801,8 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event)
sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y)); sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y));
textX->SetValue(wxString::Format(wxT("%i"), *x)); textX->SetValue(wxString::Format("%i", *x));
textY->SetValue(wxString::Format(wxT("%i"), 256 - *y)); textY->SetValue(wxString::Format("%i", 256 - *y));
sliderX->SetValue(*x); sliderX->SetValue(*x);
sliderY->SetValue(256 - *y); sliderY->SetValue(256 - *y);
@ -858,8 +858,8 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y)); sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y));
textX->SetValue(wxString::Format(wxT("%i"), *x)); textX->SetValue(wxString::Format("%i", *x));
textY->SetValue(wxString::Format(wxT("%i"), 256 - *y)); textY->SetValue(wxString::Format("%i", 256 - *y));
sliderX->SetValue(*x); sliderX->SetValue(*x);
sliderY->SetValue(256 - *y); sliderY->SetValue(256 - *y);

View File

@ -391,7 +391,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// AF // AF
{ {
const wxString af_choices[] = {wxT("1x"), wxT("2x"), wxT("4x"), wxT("8x"), wxT("16x")}; const wxString af_choices[] = {"1x", "2x", "4x", "8x", "16x"};
szr_enh->Add(new wxStaticText(page_enh, -1, _("Anisotropic Filtering:")), 1, wxALIGN_CENTER_VERTICAL, 0); szr_enh->Add(new wxStaticText(page_enh, -1, _("Anisotropic Filtering:")), 1, wxALIGN_CENTER_VERTICAL, 0);
szr_enh->Add(CreateChoice(page_enh, vconfig.iMaxAnisotropy, wxGetTranslation(af_desc), 5, af_choices)); szr_enh->Add(CreateChoice(page_enh, vconfig.iMaxAnisotropy, wxGetTranslation(af_desc), 5, af_choices));
} }

View File

@ -33,8 +33,8 @@ const wxString WXKeyToString(int keycode)
case WXK_CANCEL: return _("Cancel"); case WXK_CANCEL: return _("Cancel");
case WXK_MBUTTON: return _("M Button"); case WXK_MBUTTON: return _("M Button");
case WXK_CLEAR: return _("Clear"); case WXK_CLEAR: return _("Clear");
case WXK_SHIFT: return wxT("Shift"); case WXK_SHIFT: return "Shift";
case WXK_ALT: return wxT("Alt"); case WXK_ALT: return "Alt";
case WXK_RAW_CONTROL: return _("Control"); case WXK_RAW_CONTROL: return _("Control");
#ifdef __WXOSX__ #ifdef __WXOSX__
case WXK_COMMAND: return _("Command"); case WXK_COMMAND: return _("Command");
@ -54,46 +54,46 @@ const wxString WXKeyToString(int keycode)
case WXK_SNAPSHOT: return _("Snapshot"); case WXK_SNAPSHOT: return _("Snapshot");
case WXK_INSERT: return _("Insert"); case WXK_INSERT: return _("Insert");
case WXK_HELP: return _("Help"); case WXK_HELP: return _("Help");
case WXK_NUMPAD0: return wxT("NP 0"); case WXK_NUMPAD0: return "NP 0";
case WXK_NUMPAD1: return wxT("NP 1"); case WXK_NUMPAD1: return "NP 1";
case WXK_NUMPAD2: return wxT("NP 2"); case WXK_NUMPAD2: return "NP 2";
case WXK_NUMPAD3: return wxT("NP 3"); case WXK_NUMPAD3: return "NP 3";
case WXK_NUMPAD4: return wxT("NP 4"); case WXK_NUMPAD4: return "NP 4";
case WXK_NUMPAD5: return wxT("NP 5"); case WXK_NUMPAD5: return "NP 5";
case WXK_NUMPAD6: return wxT("NP 6"); case WXK_NUMPAD6: return "NP 6";
case WXK_NUMPAD7: return wxT("NP 7"); case WXK_NUMPAD7: return "NP 7";
case WXK_NUMPAD8: return wxT("NP 8"); case WXK_NUMPAD8: return "NP 8";
case WXK_NUMPAD9: return wxT("NP 9"); case WXK_NUMPAD9: return "NP 9";
case WXK_MULTIPLY: return _("Multiply"); case WXK_MULTIPLY: return _("Multiply");
case WXK_ADD: return _("Add"); case WXK_ADD: return _("Add");
case WXK_SEPARATOR: return _("Separator"); case WXK_SEPARATOR: return _("Separator");
case WXK_SUBTRACT: return _("Subtract"); case WXK_SUBTRACT: return _("Subtract");
case WXK_DECIMAL: return _("Decimal"); case WXK_DECIMAL: return _("Decimal");
case WXK_DIVIDE: return _("Divide"); case WXK_DIVIDE: return _("Divide");
case WXK_F1: return wxT("F1"); case WXK_F1: return "F1";
case WXK_F2: return wxT("F2"); case WXK_F2: return "F2";
case WXK_F3: return wxT("F3"); case WXK_F3: return "F3";
case WXK_F4: return wxT("F4"); case WXK_F4: return "F4";
case WXK_F5: return wxT("F5"); case WXK_F5: return "F5";
case WXK_F6: return wxT("F6"); case WXK_F6: return "F6";
case WXK_F7: return wxT("F7"); case WXK_F7: return "F7";
case WXK_F8: return wxT("F8"); case WXK_F8: return "F8";
case WXK_F9: return wxT("F9"); case WXK_F9: return "F9";
case WXK_F10: return wxT("F10"); case WXK_F10: return "F10";
case WXK_F11: return wxT("F11"); case WXK_F11: return "F11";
case WXK_F12: return wxT("F12"); case WXK_F12: return "F12";
case WXK_F13: return wxT("F13"); case WXK_F13: return "F13";
case WXK_F14: return wxT("F14"); case WXK_F14: return "F14";
case WXK_F15: return wxT("F15"); case WXK_F15: return "F15";
case WXK_F16: return wxT("F16"); case WXK_F16: return "F16";
case WXK_F17: return wxT("F17"); case WXK_F17: return "F17";
case WXK_F18: return wxT("F19"); case WXK_F18: return "F19";
case WXK_F19: return wxT("F20"); case WXK_F19: return "F20";
case WXK_F20: return wxT("F21"); case WXK_F20: return "F21";
case WXK_F21: return wxT("F22"); case WXK_F21: return "F22";
case WXK_F22: return wxT("F23"); case WXK_F22: return "F23";
case WXK_F23: return wxT("F24"); case WXK_F23: return "F24";
case WXK_F24: return wxT("F25"); case WXK_F24: return "F25";
case WXK_NUMLOCK: return _("Num Lock"); case WXK_NUMLOCK: return _("Num Lock");
case WXK_SCROLL: return _("Scroll Lock"); case WXK_SCROLL: return _("Scroll Lock");
case WXK_PAGEUP: return _("Page Up"); case WXK_PAGEUP: return _("Page Up");
@ -101,10 +101,10 @@ const wxString WXKeyToString(int keycode)
case WXK_NUMPAD_SPACE: return _("NP Space"); case WXK_NUMPAD_SPACE: return _("NP Space");
case WXK_NUMPAD_TAB: return _("NP Tab"); case WXK_NUMPAD_TAB: return _("NP Tab");
case WXK_NUMPAD_ENTER: return _("NP Enter"); case WXK_NUMPAD_ENTER: return _("NP Enter");
case WXK_NUMPAD_F1: return wxT("NP F1"); case WXK_NUMPAD_F1: return "NP F1";
case WXK_NUMPAD_F2: return wxT("NP F2"); case WXK_NUMPAD_F2: return "NP F2";
case WXK_NUMPAD_F3: return wxT("NP F3"); case WXK_NUMPAD_F3: return "NP F3";
case WXK_NUMPAD_F4: return wxT("NP F4"); case WXK_NUMPAD_F4: return "NP F4";
case WXK_NUMPAD_HOME: return _("NP Home"); case WXK_NUMPAD_HOME: return _("NP Home");
case WXK_NUMPAD_LEFT: return _("NP Left"); case WXK_NUMPAD_LEFT: return _("NP Left");
case WXK_NUMPAD_UP: return _("NP Up"); case WXK_NUMPAD_UP: return _("NP Up");
@ -133,7 +133,7 @@ const wxString WXKeyToString(int keycode)
return wxString((wxChar)keycode, 1); return wxString((wxChar)keycode, 1);
} }
return wxT(""); return "";
} }
const wxString WXKeymodToString(int modifier) const wxString WXKeymodToString(int modifier)
@ -142,18 +142,18 @@ const wxString WXKeymodToString(int modifier)
if (modifier & wxMOD_META) if (modifier & wxMOD_META)
#ifdef __APPLE__ #ifdef __APPLE__
mods += wxT("Cmd+"); mods += "Cmd+";
#elif defined _WIN32 #elif defined _WIN32
mods += wxT("Win+"); mods += "Win+";
#else #else
mods += wxT("Meta+"); mods += "Meta+";
#endif #endif
if (modifier & wxMOD_CONTROL) if (modifier & wxMOD_CONTROL)
mods += wxT("Ctrl+"); mods += "Ctrl+";
if (modifier & wxMOD_ALT) if (modifier & wxMOD_ALT)
mods += wxT("Alt+"); mods += "Alt+";
if (modifier & wxMOD_SHIFT) if (modifier & wxMOD_SHIFT)
mods += wxT("Shift+"); mods += "Shift+";
return mods; return mods;
} }

View File

@ -35,14 +35,14 @@ void Explore(const std::string& path)
wxString wxPath = StrToWxStr(path); wxString wxPath = StrToWxStr(path);
#ifndef _WIN32 #ifndef _WIN32
// Default to file // Default to file
if (! wxPath.Contains(wxT("://"))) if (! wxPath.Contains("://"))
{ {
wxPath = wxT("file://") + wxPath; wxPath = "file://" + wxPath;
} }
#endif #endif
#ifdef __WXGTK__ #ifdef __WXGTK__
wxPath.Replace(wxT(" "), wxT("\\ ")); wxPath.Replace(" ", "\\ ");
#endif #endif
if (! ::wxLaunchDefaultBrowser(wxPath)) if (! ::wxLaunchDefaultBrowser(wxPath))