From f1b8b050430b2a01d1f9da3d349e8791e0c7ef9a Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Thu, 10 Mar 2011 16:57:14 +0000 Subject: [PATCH] Moved the "Print CDVD info" menu item to console logs. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4409 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/gui/App.h | 1 - pcsx2/gui/ConsoleLogger.cpp | 23 +++++++++++++++++++++++ pcsx2/gui/ConsoleLogger.h | 1 + pcsx2/gui/MainFrame.cpp | 3 --- pcsx2/gui/MainFrame.h | 1 - pcsx2/gui/MainMenuClicks.cpp | 7 ------- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index 077dca1a32..e96a12cc32 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -151,7 +151,6 @@ enum MenuIdentifiers MenuId_Profiler, // Enable profiler MenuId_Console, // Enable console MenuId_Console_Stdio, // Enable Stdio - MenuId_CDVD_Info, // Debug Subsection MenuId_Debug_Open, // opens the debugger window / starts a debug session diff --git a/pcsx2/gui/ConsoleLogger.cpp b/pcsx2/gui/ConsoleLogger.cpp index d2f8e1f46d..8817269202 100644 --- a/pcsx2/gui/ConsoleLogger.cpp +++ b/pcsx2/gui/ConsoleLogger.cpp @@ -288,6 +288,7 @@ enum MenuIDs_t MenuId_LogSource_EnableAll = 0x30, MenuId_LogSource_DisableAll, MenuId_LogSource_Devel, + MenuId_LogSource_CDVD_Info, MenuId_LogSource_Start = 0x100 }; @@ -436,6 +437,8 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A // Source Selection/Toggle menu menuSources.Append( MenuId_LogSource_Devel, _("Dev/Verbose"), _("Shows PCSX2 developer logs"), wxITEM_CHECK ); + menuSources.Append( MenuId_LogSource_CDVD_Info, _("CDVD reads"), _("Shows disk read activity"), wxITEM_CHECK ); + menuSources.AppendSeparator(); uint srcnt = ArraySize(ConLogSources); @@ -474,6 +477,7 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A Connect( MenuId_ColorScheme_Light, MenuId_ColorScheme_Dark, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnToggleTheme ) ); Connect( MenuId_LogSource_Devel, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnToggleSource ) ); + Connect( MenuId_LogSource_CDVD_Info, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnToggleCDVDInfo ) ); Connect( MenuId_LogSource_EnableAll, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnEnableAllLogging ) ); Connect( MenuId_LogSource_DisableAll, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnDisableAllLogging ) ); @@ -542,6 +546,9 @@ void ConsoleLogFrame::OnLoggingChanged() if( wxMenuItem* item = GetMenuBar()->FindItem(MenuId_LogSource_Devel) ) item->Check( DevConWriterEnabled ); + if( wxMenuItem* item = GetMenuBar()->FindItem(MenuId_LogSource_CDVD_Info) ) + item->Check( g_Conf->EmuOptions.CdvdVerboseReads ); + uint srcnt = ArraySize(ConLogSources); for (uint i=0; iFindItem(evt.GetId()) ) + { + g_Conf->EmuOptions.CdvdVerboseReads = item->IsChecked(); + const_cast(EmuConfig).CdvdVerboseReads = g_Conf->EmuOptions.CdvdVerboseReads; // read-only in core thread, so it's safe to modify. + } + } +} + void ConsoleLogFrame::OnToggleSource( wxCommandEvent& evt ) { evt.Skip(); diff --git a/pcsx2/gui/ConsoleLogger.h b/pcsx2/gui/ConsoleLogger.h index 89a679fa2b..651c394987 100644 --- a/pcsx2/gui/ConsoleLogger.h +++ b/pcsx2/gui/ConsoleLogger.h @@ -246,6 +246,7 @@ protected: void OnToggleTheme(wxCommandEvent& event); void OnFontSize(wxCommandEvent& event); void OnToggleSource(wxCommandEvent& event); + void OnToggleCDVDInfo(wxCommandEvent& event); virtual void OnCloseWindow(wxCloseEvent& event); diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index 550c8484df..958a6d4f3c 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -224,7 +224,6 @@ void MainEmuFrame::ConnectMenus() ConnectMenu( MenuId_Console, Menu_ShowConsole ); ConnectMenu( MenuId_Console_Stdio, Menu_ShowConsole_Stdio ); - ConnectMenu( MenuId_CDVD_Info, Menu_PrintCDVD_Info ); ConnectMenu( MenuId_About, Menu_ShowAboutBox ); } @@ -484,7 +483,6 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title) //m_menuMisc.Append(41, "Patch Browser...", wxEmptyString, wxITEM_NORMAL); //m_menuMisc.Append(42, "Patch Finder...", wxEmptyString, wxITEM_NORMAL); - m_menuMisc.Append(MenuId_CDVD_Info, _("Print CDVD Info"), wxEmptyString, wxITEM_CHECK); m_menuMisc.AppendSeparator(); //Todo: @@ -656,7 +654,6 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags) menubar.Check( MenuId_EnableBackupStates, configToApply.EmuOptions.BackupSavestate ); menubar.Check( MenuId_EnableCheats, configToApply.EmuOptions.EnableCheats ); menubar.Check( MenuId_EnableHostFs, configToApply.EmuOptions.HostFs ); - menubar.Check( MenuId_CDVD_Info, configToApply.EmuOptions.CdvdVerboseReads ); #ifdef __LINUX__ menubar.Check( MenuId_Console_Stdio, configToApply.EmuOptions.ConsoleToStdio ); #endif diff --git a/pcsx2/gui/MainFrame.h b/pcsx2/gui/MainFrame.h index 9345922b62..3132aba2dc 100644 --- a/pcsx2/gui/MainFrame.h +++ b/pcsx2/gui/MainFrame.h @@ -203,7 +203,6 @@ protected: void Menu_ShowConsole(wxCommandEvent &event); void Menu_ShowConsole_Stdio(wxCommandEvent &event); - void Menu_PrintCDVD_Info(wxCommandEvent &event); void Menu_ShowAboutBox(wxCommandEvent &event); void _DoBootCdvd(); diff --git a/pcsx2/gui/MainMenuClicks.cpp b/pcsx2/gui/MainMenuClicks.cpp index ada32bd999..6bc4eb9dec 100644 --- a/pcsx2/gui/MainMenuClicks.cpp +++ b/pcsx2/gui/MainMenuClicks.cpp @@ -563,13 +563,6 @@ void MainEmuFrame::Menu_ShowConsole_Stdio(wxCommandEvent &event) AppSaveSettings(); } -void MainEmuFrame::Menu_PrintCDVD_Info(wxCommandEvent &event) -{ - g_Conf->EmuOptions.CdvdVerboseReads = GetMenuBar()->IsChecked( MenuId_CDVD_Info ); - const_cast(EmuConfig).CdvdVerboseReads = g_Conf->EmuOptions.CdvdVerboseReads; // read-only in core thread, so it's safe to modify. - AppSaveSettings(); -} - void MainEmuFrame::Menu_ShowAboutBox(wxCommandEvent &event) { AppOpenDialog( this );