pcsx2:gui: Add menu item for creating block dumps

This commit is contained in:
Jonathan Li 2017-01-26 18:46:14 +00:00
parent 1cf30584f0
commit 56c2d20b90
4 changed files with 13 additions and 0 deletions

View File

@ -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,
};

View File

@ -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

View File

@ -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);

View File

@ -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& )
{