diff --git a/pcsx2/gui/Dialogs/GSDumpDialog.cpp b/pcsx2/gui/Dialogs/GSDumpDialog.cpp index 5e7943ff8..e851e478d 100644 --- a/pcsx2/gui/Dialogs/GSDumpDialog.cpp +++ b/pcsx2/gui/Dialogs/GSDumpDialog.cpp @@ -83,10 +83,10 @@ Dialogs::GSDumpDialog::GSDumpDialog(wxWindow* parent) dbg_tree += new wxStaticText(this, wxID_ANY, _("GIF Packets")); dbg_tree += new wxTreeCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(250, 200)); dbg_actions += m_debug_mode; - dbg_actions += new wxButton(this, wxID_ANY, _("Go to Start")); - dbg_actions += new wxButton(this, wxID_ANY, _("Step")); - dbg_actions += new wxButton(this, wxID_ANY, _("Run to Selection")); - dbg_actions += new wxButton(this, wxID_ANY, _("Go to next VSync")); + dbg_actions += new wxButton(this, ID_RUN_START, _("Go to Start")); + dbg_actions += new wxButton(this, ID_RUN_STEP, _("Step")); + dbg_actions += new wxButton(this, ID_RUN_CURSOR, _("Run to Selection")); + dbg_actions += new wxButton(this, ID_RUN_VSYNC, _("Go to next VSync")); // gif gif += new wxStaticText(this, wxID_ANY, _("Packet Content")); @@ -120,6 +120,10 @@ Dialogs::GSDumpDialog::GSDumpDialog(wxWindow* parent) Bind(wxEVT_LIST_ITEM_SELECTED, &Dialogs::GSDumpDialog::SelectedDump, this, ID_DUMP_LIST); Bind(wxEVT_BUTTON, &Dialogs::GSDumpDialog::RunDump, this, ID_RUN_DUMP); + Bind(wxEVT_BUTTON, &Dialogs::GSDumpDialog::ToStart, this, ID_RUN_START); + Bind(wxEVT_BUTTON, &Dialogs::GSDumpDialog::StepPacket, this, ID_RUN_STEP); + Bind(wxEVT_BUTTON, &Dialogs::GSDumpDialog::ToCursor, this, ID_RUN_CURSOR); + Bind(wxEVT_BUTTON, &Dialogs::GSDumpDialog::ToVSync, this, ID_RUN_VSYNC); } void Dialogs::GSDumpDialog::GetDumpsList() @@ -250,7 +254,6 @@ void Dialogs::GSDumpDialog::RunDump(wxCommandEvent& event) while (0!=1) { - if (m_debug_mode->GetValue()) { if (m_button_events.size() > 0) @@ -366,3 +369,24 @@ void Dialogs::GSDumpDialog::ProcessDumpEvent(GSData event, char* regs) } } } + +void Dialogs::GSDumpDialog::StepPacket(wxCommandEvent& event) +{ + m_button_events.push_back(GSEvent{Step, 0}); +} + +void Dialogs::GSDumpDialog::ToCursor(wxCommandEvent& event) +{ + // TODO: modify 0 to wxTreeCtrl index + m_button_events.push_back(GSEvent{RunCursor, 0}); +} + +void Dialogs::GSDumpDialog::ToVSync(wxCommandEvent& event) +{ + m_button_events.push_back(GSEvent{RunVSync, 0}); +} + +void Dialogs::GSDumpDialog::ToStart(wxCommandEvent& event) +{ + m_button_events.push_back(GSEvent{RunCursor, 0}); +} \ No newline at end of file diff --git a/pcsx2/gui/Dialogs/ModalPopups.h b/pcsx2/gui/Dialogs/ModalPopups.h index f75208780..ede9c4313 100644 --- a/pcsx2/gui/Dialogs/ModalPopups.h +++ b/pcsx2/gui/Dialogs/ModalPopups.h @@ -92,10 +92,18 @@ namespace Dialogs void GetDumpsList(); void SelectedDump(wxListEvent& evt); void RunDump(wxCommandEvent& event); + void ToStart(wxCommandEvent& event); + void StepPacket(wxCommandEvent& event); + void ToCursor(wxCommandEvent& event); + void ToVSync(wxCommandEvent& event); enum { ID_DUMP_LIST, - ID_RUN_DUMP + ID_RUN_DUMP, + ID_RUN_START, + ID_RUN_STEP, + ID_RUN_CURSOR, + ID_RUN_VSYNC }; enum GSType : u8 {