diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index 276a04d2e1..4dd838564d 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -157,6 +157,7 @@ enum MenuIdentifiers MenuId_Debug_Open, // opens the debugger window / starts a debug session MenuId_Debug_MemoryDump, MenuId_Debug_Logging, // dialog for selection additional log options + MenuId_Debug_CreateBlockdump, MenuId_Config_ResetAll, }; diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index 6da502dbf6..59564cb60e 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -211,6 +211,7 @@ void MainEmuFrame::ConnectMenus() Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_Iso); Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_Plugin); Bind(wxEVT_MENU, &MainEmuFrame::Menu_CdvdSource_Click, this, MenuId_Src_NoDisc); + Bind(wxEVT_MENU, &MainEmuFrame::Menu_Debug_CreateBlockdump_Click, this, MenuId_Debug_CreateBlockdump); // Config Bind(wxEVT_MENU, &MainEmuFrame::Menu_SysSettings_Click, this, MenuId_Config_SysSettings); @@ -528,6 +529,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title) #ifdef PCSX2_DEVBUILD m_menuDebug.Append(MenuId_Debug_Logging, _("&Logging..."), wxEmptyString); #endif + m_menuDebug.AppendCheckItem(MenuId_Debug_CreateBlockdump, _("Create &Blockdump"), _("Creates a block dump for debugging purposes.")); m_MenuItem_Console.Check( g_Conf->ProgLogBox.Visible ); @@ -722,6 +724,7 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags) menubar.Check( MenuId_EnableCheats, configToApply.EmuOptions.EnableCheats ); menubar.Check( MenuId_EnableWideScreenPatches, configToApply.EmuOptions.EnableWideScreenPatches ); menubar.Check( MenuId_EnableHostFs, configToApply.EmuOptions.HostFs ); + menubar.Check( MenuId_Debug_CreateBlockdump, configToApply.EmuOptions.CdvdDumpBlocks ); #if defined(__unix__) menubar.Check( MenuId_Console_Stdio, configToApply.EmuOptions.ConsoleToStdio ); #endif diff --git a/pcsx2/gui/MainFrame.h b/pcsx2/gui/MainFrame.h index 956344300c..a738b1ffd3 100644 --- a/pcsx2/gui/MainFrame.h +++ b/pcsx2/gui/MainFrame.h @@ -196,6 +196,7 @@ protected: void Menu_Debug_Open_Click(wxCommandEvent &event); void Menu_Debug_MemoryDump_Click(wxCommandEvent &event); void Menu_Debug_Logging_Click(wxCommandEvent &event); + void Menu_Debug_CreateBlockdump_Click(wxCommandEvent &event); void Menu_ShowConsole(wxCommandEvent &event); void Menu_ChangeLang(wxCommandEvent &event); diff --git a/pcsx2/gui/MainMenuClicks.cpp b/pcsx2/gui/MainMenuClicks.cpp index bd149f3215..3d0971e397 100644 --- a/pcsx2/gui/MainMenuClicks.cpp +++ b/pcsx2/gui/MainMenuClicks.cpp @@ -418,6 +418,14 @@ void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event ) AppSaveSettings(); // save the new iso selection; update menus! } +void MainEmuFrame::Menu_Debug_CreateBlockdump_Click(wxCommandEvent &event) +{ + g_Conf->EmuOptions.CdvdDumpBlocks = event.IsChecked(); + if (g_Conf->EmuOptions.CdvdDumpBlocks && SysHasValidState()) + Console.Warning("VM must be rebooted to create a useful block dump."); + + AppSaveSettings(); +} void MainEmuFrame::Menu_MultitapToggle_Click( wxCommandEvent& ) {