mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-02 13:01:18 +12:00
UI: Make code compatible with wxWidgets 3.3 (#1598)
This commit is contained in:
parent
95dc590d2c
commit
da98aa4176
7 changed files with 14 additions and 14 deletions
|
@ -283,7 +283,7 @@ void EmulatedUSBDeviceFrame::LoadSkylanderPath(uint8 slot, wxString path)
|
||||||
std::unique_ptr<FileStream> skyFile(FileStream::openFile2(_utf8ToPath(path.utf8_string()), true));
|
std::unique_ptr<FileStream> skyFile(FileStream::openFile2(_utf8ToPath(path.utf8_string()), true));
|
||||||
if (!skyFile)
|
if (!skyFile)
|
||||||
{
|
{
|
||||||
wxMessageDialog open_error(this, "Error Opening File: " + path.c_str());
|
wxMessageDialog open_error(this, "Error Opening File: " + path);
|
||||||
open_error.ShowModal();
|
open_error.ShowModal();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,7 +356,7 @@ void TitleManager::OnTitleSearchComplete(wxCommandEvent& event)
|
||||||
|
|
||||||
void TitleManager::OnSetStatusBarText(wxSetStatusBarTextEvent& event)
|
void TitleManager::OnSetStatusBarText(wxSetStatusBarTextEvent& event)
|
||||||
{
|
{
|
||||||
m_status_bar->SetStatusText(_(event.GetText()), event.GetNumber());
|
m_status_bar->SetStatusText(event.GetText(), event.GetNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleManager::OnFilterChanged(wxCommandEvent& event)
|
void TitleManager::OnFilterChanged(wxCommandEvent& event)
|
||||||
|
|
|
@ -576,7 +576,7 @@ void wxTitleManagerList::OnConvertToCompressedFormat(uint64 titleId, uint64 righ
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
progressDialog.Update(0, _("Collecting list of files..." + fmt::format(" ({})", writerContext.totalFileCount.load())));
|
progressDialog.Update(0, _("Collecting list of files...") + fmt::format(" ({})", writerContext.totalFileCount.load()));
|
||||||
}
|
}
|
||||||
if (progressDialog.WasCancelled())
|
if (progressDialog.WasCancelled())
|
||||||
writerContext.cancelled.store(true);
|
writerContext.cancelled.store(true);
|
||||||
|
|
|
@ -615,7 +615,7 @@ void DisasmCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
|
||||||
{
|
{
|
||||||
// double-clicked on disassembly (operation and operand data)
|
// double-clicked on disassembly (operation and operand data)
|
||||||
wxString currentInstruction = wxEmptyString;
|
wxString currentInstruction = wxEmptyString;
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new instruction."), _(wxString::Format("Overwrite instruction at address %08x", virtualAddress)), currentInstruction);
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new instruction."), wxString::Format(_("Overwrite instruction at address %08x"), virtualAddress), currentInstruction);
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
PPCAssemblerInOut ctx = { 0 };
|
PPCAssemblerInOut ctx = { 0 };
|
||||||
|
@ -637,7 +637,7 @@ void DisasmCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
|
||||||
if (comment && comment->type == RplDebugSymbolComment)
|
if (comment && comment->type == RplDebugSymbolComment)
|
||||||
old_comment = comment->comment;
|
old_comment = comment->comment;
|
||||||
|
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new comment."), _(wxString::Format("Create comment at address %08x", virtualAddress)), old_comment);
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new comment."), wxString::Format(_("Create comment at address %08x"), virtualAddress), old_comment);
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
rplDebugSymbol_createComment(virtualAddress, set_value_dialog.GetValue().wc_str());
|
rplDebugSymbol_createComment(virtualAddress, set_value_dialog.GetValue().wc_str());
|
||||||
|
@ -850,4 +850,4 @@ void DisasmCtrl::GoToAddressDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ void DumpCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
|
||||||
const uint32 offset = LineToOffset(line) + byte_index;
|
const uint32 offset = LineToOffset(line) + byte_index;
|
||||||
const uint8 value = memory_readU8(offset);
|
const uint8 value = memory_readU8(offset);
|
||||||
|
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set byte at address %08x", offset)), wxString::Format("%02x", value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set byte at address %08x"), offset), wxString::Format("%02x", value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const uint8 new_value = std::stoul(set_value_dialog.GetValue().ToStdString(), nullptr, 16);
|
const uint8 new_value = std::stoul(set_value_dialog.GetValue().ToStdString(), nullptr, 16);
|
||||||
|
@ -303,4 +303,4 @@ void DumpCtrl::OnKeyPressed(sint32 key_code, const wxPoint& position)
|
||||||
wxSize DumpCtrl::DoGetBestSize() const
|
wxSize DumpCtrl::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
return TextList::DoGetBestSize();
|
return TextList::DoGetBestSize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,7 @@ void RegisterCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
|
||||||
if (position.x <= OFFSET_REGISTER + OFFSET_REGISTER_LABEL)
|
if (position.x <= OFFSET_REGISTER + OFFSET_REGISTER_LABEL)
|
||||||
{
|
{
|
||||||
const uint32 register_value = debuggerState.debugSession.ppcSnapshot.gpr[register_index];
|
const uint32 register_value = debuggerState.debugSession.ppcSnapshot.gpr[register_index];
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set R%d value", register_index)), wxString::Format("%08x", register_value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set R%d value"), register_index), wxString::Format("%08x", register_value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const uint32 new_value = std::stoul(set_value_dialog.GetValue().ToStdString(), nullptr, 16);
|
const uint32 new_value = std::stoul(set_value_dialog.GetValue().ToStdString(), nullptr, 16);
|
||||||
|
@ -220,7 +220,7 @@ void RegisterCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
|
||||||
if (position.x <= OFFSET_REGISTER + OFFSET_FPR)
|
if (position.x <= OFFSET_REGISTER + OFFSET_FPR)
|
||||||
{
|
{
|
||||||
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp0;
|
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp0;
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set FP0_%d value", register_index)), wxString::Format("%lf", register_value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set FP0_%d value"), register_index), wxString::Format("%lf", register_value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
||||||
|
@ -234,7 +234,7 @@ void RegisterCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp1;
|
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp1;
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set FP1_%d value", register_index)), wxString::Format("%lf", register_value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set FP1_%d value"), register_index), wxString::Format("%lf", register_value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
||||||
|
|
|
@ -339,7 +339,7 @@ void RegisterWindow::OnMouseDClickEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
const uint32 register_index = id - kRegisterValueR0;
|
const uint32 register_index = id - kRegisterValueR0;
|
||||||
const uint32 register_value = debuggerState.debugSession.ppcSnapshot.gpr[register_index];
|
const uint32 register_value = debuggerState.debugSession.ppcSnapshot.gpr[register_index];
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set R%d value", register_index)), wxString::Format("%08x", register_value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set R%d value"), register_index), wxString::Format("%08x", register_value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const uint32 new_value = std::stoul(set_value_dialog.GetValue().ToStdString(), nullptr, 16);
|
const uint32 new_value = std::stoul(set_value_dialog.GetValue().ToStdString(), nullptr, 16);
|
||||||
|
@ -355,7 +355,7 @@ void RegisterWindow::OnMouseDClickEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
const uint32 register_index = id - kRegisterValueFPR0_0;
|
const uint32 register_index = id - kRegisterValueFPR0_0;
|
||||||
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp0;
|
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp0;
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set FP0_%d value", register_index)), wxString::Format("%lf", register_value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set FP0_%d value"), register_index), wxString::Format("%lf", register_value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
||||||
|
@ -371,7 +371,7 @@ void RegisterWindow::OnMouseDClickEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
const uint32 register_index = id - kRegisterValueFPR1_0;
|
const uint32 register_index = id - kRegisterValueFPR1_0;
|
||||||
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp1;
|
const double register_value = debuggerState.debugSession.ppcSnapshot.fpr[register_index].fp1;
|
||||||
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), _(wxString::Format("Set FP1_%d value", register_index)), wxString::Format("%lf", register_value));
|
wxTextEntryDialog set_value_dialog(this, _("Enter a new value."), wxString::Format(_("Set FP1_%d value"), register_index), wxString::Format("%lf", register_value));
|
||||||
if (set_value_dialog.ShowModal() == wxID_OK)
|
if (set_value_dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
const double new_value = std::stod(set_value_dialog.GetValue().ToStdString());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue