mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
nakee's new logmanager. added a console window for windows builds (prints to parent console on non-win32). also fix some random wxw bugs: main window's position is saved when using debugger, disabling windows from the tools menu are saved settings, some other small fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2675 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -642,14 +642,6 @@
|
||||
RelativePath=".\src\JitWindow.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\LogWindow.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\LogWindow.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\MemoryCheckDlg.cpp"
|
||||
>
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "Debugger.h"
|
||||
|
||||
#include "RegisterWindow.h"
|
||||
#include "LogWindow.h"
|
||||
#include "BreakpointWindow.h"
|
||||
#include "MemoryWindow.h"
|
||||
#include "JitWindow.h"
|
||||
@ -121,8 +120,7 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
||||
EVT_MENU(IDM_JITPOFF, CCodeWindow::OnCPUMode)
|
||||
EVT_MENU(IDM_JITSROFF, CCodeWindow::OnCPUMode)
|
||||
|
||||
EVT_MENU(IDM_LOGWINDOW, CCodeWindow::OnToggleLogWindow) // Views
|
||||
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleRegisterWindow)
|
||||
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleRegisterWindow) //views
|
||||
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
|
||||
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleMemoryWindow)
|
||||
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleJitWindow)
|
||||
@ -167,7 +165,6 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
||||
|
||||
/* Remember to initialize potential new controls with NULL there, otherwise m_dialog = true and
|
||||
things may crash */
|
||||
, m_LogWindow(NULL)
|
||||
, m_RegisterWindow(NULL)
|
||||
, m_BreakpointWindow(NULL)
|
||||
, m_MemoryWindow(NULL)
|
||||
@ -208,7 +205,6 @@ CCodeWindow::~CCodeWindow()
|
||||
|
||||
this->Save(file);
|
||||
if (m_BreakpointWindow) m_BreakpointWindow->Save(file);
|
||||
if (m_LogWindow) m_LogWindow->Save(file);
|
||||
if (m_RegisterWindow) m_RegisterWindow->Save(file);
|
||||
if (m_MemoryWindow) m_MemoryWindow->Save(file);
|
||||
if (m_JitWindow) m_JitWindow->Save(file);
|
||||
@ -236,7 +232,7 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
|
||||
NotifyMapLoaded();
|
||||
break;
|
||||
|
||||
case IDM_UPDATELOGDISPLAY:
|
||||
/* case IDM_UPDATELOGDISPLAY:
|
||||
|
||||
if (m_LogWindow)
|
||||
{
|
||||
@ -244,7 +240,7 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
*/
|
||||
case IDM_UPDATEDISASMDIALOG:
|
||||
Update();
|
||||
|
||||
@ -295,7 +291,6 @@ void CCodeWindow::Load_( IniFile &ini )
|
||||
DebuggerFont.SetNativeFontInfoUserDesc(wxString(fontDesc.c_str(), wxConvUTF8));
|
||||
|
||||
// Decide what windows to use
|
||||
ini.Get("ShowOnStart", "LogWindow", &bLogWindow, true);
|
||||
ini.Get("ShowOnStart", "RegisterWindow", &bRegisterWindow, true);
|
||||
ini.Get("ShowOnStart", "BreakpointWindow", &bBreakpointWindow, true);
|
||||
ini.Get("ShowOnStart", "MemoryWindow", &bMemoryWindow, true);
|
||||
@ -318,6 +313,11 @@ void CCodeWindow::Load( IniFile &ini )
|
||||
ini.Get("CodeWindow", "w", &w, GetSize().GetWidth());
|
||||
ini.Get("CodeWindow", "h", &h, GetSize().GetHeight());
|
||||
this->SetSize(x, y, w, h);
|
||||
ini.Get("MainWindow", "x", &x, 100);
|
||||
ini.Get("MainWindow", "y", &y, 100);
|
||||
ini.Get("MainWindow", "w", &w, 800);
|
||||
ini.Get("MainWindow", "h", &h, 600);
|
||||
GetParent()->SetSize(x, y, w, h);
|
||||
}
|
||||
|
||||
|
||||
@ -327,6 +327,10 @@ void CCodeWindow::Save(IniFile &ini) const
|
||||
ini.Set("CodeWindow", "y", GetPosition().y);
|
||||
ini.Set("CodeWindow", "w", GetSize().GetWidth());
|
||||
ini.Set("CodeWindow", "h", GetSize().GetHeight());
|
||||
ini.Set("MainWindow", "x", GetParent()->GetPosition().x);
|
||||
ini.Set("MainWindow", "y", GetParent()->GetPosition().y);
|
||||
ini.Set("MainWindow", "w", GetParent()->GetSize().GetWidth());
|
||||
ini.Set("MainWindow", "h", GetParent()->GetSize().GetHeight());
|
||||
|
||||
ini.Set("ShowOnStart", "DebuggerFont", std::string(DebuggerFont.GetNativeFontInfoUserDesc().mb_str()));
|
||||
|
||||
@ -335,7 +339,6 @@ void CCodeWindow::Save(IniFile &ini) const
|
||||
ini.Set("ShowOnStart", "BootToPause", GetMenuBar()->IsChecked(IDM_BOOTTOPAUSE));
|
||||
|
||||
// Save windows settings
|
||||
ini.Set("ShowOnStart", "LogWindow", GetMenuBar()->IsChecked(IDM_LOGWINDOW));
|
||||
ini.Set("ShowOnStart", "RegisterWindow", GetMenuBar()->IsChecked(IDM_REGISTERWINDOW));
|
||||
ini.Set("ShowOnStart", "BreakpointWindow", GetMenuBar()->IsChecked(IDM_BREAKPOINTWINDOW));
|
||||
ini.Set("ShowOnStart", "MemoryWindow", GetMenuBar()->IsChecked(IDM_MEMORYWINDOW));
|
||||
@ -375,15 +378,6 @@ void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStart
|
||||
// =================
|
||||
|
||||
|
||||
// Additional dialogs
|
||||
#if LOGLEVEL > 0
|
||||
if (bLogWindow)
|
||||
{
|
||||
m_LogWindow = new CLogWindow(this);
|
||||
m_LogWindow->Show(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bRegisterWindow)
|
||||
{
|
||||
m_RegisterWindow = new CRegisterWindow(this);
|
||||
@ -504,12 +498,6 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
||||
// ---------------
|
||||
wxMenu* pDebugDialogs = new wxMenu;
|
||||
|
||||
if (LogManager::GetLevel() > 0)
|
||||
{
|
||||
wxMenuItem* pLogWindow = pDebugDialogs->Append(IDM_LOGWINDOW, _T("&LogManager"), wxEmptyString, wxITEM_CHECK);
|
||||
pLogWindow->Check(bLogWindow);
|
||||
}
|
||||
|
||||
wxMenuItem* pRegister = pDebugDialogs->Append(IDM_REGISTERWINDOW, _T("&Registers"), wxEmptyString, wxITEM_CHECK);
|
||||
pRegister->Check(bRegisterWindow);
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "CoreParameter.h"
|
||||
|
||||
class CRegisterWindow;
|
||||
class CLogWindow;
|
||||
class CBreakPointWindow;
|
||||
class CMemoryWindow;
|
||||
class CJitWindow;
|
||||
@ -146,7 +145,6 @@ class CCodeWindow
|
||||
|
||||
// Settings
|
||||
bool bAutomaticStart; bool bBootToPause;
|
||||
bool bLogWindow;
|
||||
bool bRegisterWindow;
|
||||
bool bBreakpointWindow;
|
||||
bool bMemoryWindow;
|
||||
@ -156,7 +154,6 @@ class CCodeWindow
|
||||
|
||||
// Sub dialogs
|
||||
wxMenuBar* pMenuBar;
|
||||
CLogWindow* m_LogWindow;
|
||||
CRegisterWindow* m_RegisterWindow;
|
||||
CBreakPointWindow* m_BreakpointWindow;
|
||||
CMemoryWindow* m_MemoryWindow;
|
||||
@ -195,7 +192,6 @@ class CCodeWindow
|
||||
|
||||
void OnToggleRegisterWindow(wxCommandEvent& event);
|
||||
void OnToggleBreakPointWindow(wxCommandEvent& event);
|
||||
void OnToggleLogWindow(wxCommandEvent& event);
|
||||
void OnToggleMemoryWindow(wxCommandEvent& event);
|
||||
void OnToggleJitWindow(wxCommandEvent& event);
|
||||
void OnToggleSoundWindow(wxCommandEvent& event);
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "Debugger.h"
|
||||
|
||||
#include "RegisterWindow.h"
|
||||
#include "LogWindow.h"
|
||||
#include "BreakpointWindow.h"
|
||||
#include "MemoryWindow.h"
|
||||
#include "JitWindow.h"
|
||||
@ -308,44 +307,6 @@ void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Show and hide windows
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void CCodeWindow::OnToggleLogWindow(wxCommandEvent& event)
|
||||
{
|
||||
if (LogManager::GetLevel() > 0)
|
||||
{
|
||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
||||
|
||||
if (show)
|
||||
{
|
||||
if (!m_LogWindow)
|
||||
{
|
||||
m_LogWindow = new CLogWindow(this);
|
||||
}
|
||||
|
||||
m_LogWindow->Show(true);
|
||||
}
|
||||
else // hide
|
||||
{
|
||||
// If m_dialog is NULL, then possibly the system
|
||||
// didn't report the checked menu item status correctly.
|
||||
// It should be true just after the menu item was selected,
|
||||
// if there was no modeless dialog yet.
|
||||
wxASSERT(m_LogWindow != NULL);
|
||||
|
||||
if (m_LogWindow)
|
||||
{
|
||||
m_LogWindow->Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CCodeWindow::OnToggleRegisterWindow(wxCommandEvent& event)
|
||||
{
|
||||
bool show = GetMenuBar()->IsChecked(event.GetId());
|
||||
|
@ -18,17 +18,6 @@
|
||||
#ifndef _DEBUGGER_H
|
||||
#define _DEBUGGER_H
|
||||
|
||||
enum
|
||||
{
|
||||
IDM_LOG,
|
||||
IDM_UPDATELOG,
|
||||
IDM_CLEARLOG,
|
||||
IDM_LOGCHECKS,
|
||||
IDM_OPTIONS,
|
||||
IDM_ENABLEALL,
|
||||
IDM_RADIO0,
|
||||
IDM_SUBMITCMD = 300,
|
||||
};
|
||||
|
||||
#define wxUSE_XPM_IN_MSW 1
|
||||
#define USE_XPM_BITMAPS 1
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "CoreParameter.h"
|
||||
|
||||
class CRegisterWindow;
|
||||
class CLogWindow;
|
||||
class CBreakPointWindow;
|
||||
|
||||
class CMemoryWindow
|
||||
|
@ -5,21 +5,21 @@ Import('env')
|
||||
if not env['HAVE_WX']:
|
||||
Return()
|
||||
|
||||
files = ["LogWindow.cpp",
|
||||
"BreakPointDlg.cpp",
|
||||
"BreakpointView.cpp",
|
||||
"CodeView.cpp",
|
||||
"BreakpointWindow.cpp",
|
||||
"CodeWindow.cpp",
|
||||
"CodeWindowSJP.cpp",
|
||||
"CodeView.cpp",
|
||||
"MemoryCheckDlg.cpp",
|
||||
"MemoryView.cpp",
|
||||
"MemoryWindow.cpp",
|
||||
"RegisterWindow.cpp",
|
||||
"RegisterView.cpp",
|
||||
"JitWindow.cpp",
|
||||
]
|
||||
files = [
|
||||
"BreakPointDlg.cpp",
|
||||
"BreakpointView.cpp",
|
||||
"CodeView.cpp",
|
||||
"BreakpointWindow.cpp",
|
||||
"CodeWindow.cpp",
|
||||
"CodeWindowSJP.cpp",
|
||||
"CodeView.cpp",
|
||||
"MemoryCheckDlg.cpp",
|
||||
"MemoryView.cpp",
|
||||
"MemoryWindow.cpp",
|
||||
"RegisterWindow.cpp",
|
||||
"RegisterView.cpp",
|
||||
"JitWindow.cpp",
|
||||
]
|
||||
wxenv = env.Clone()
|
||||
wxenv.Append(
|
||||
CPPDEFINES = [
|
||||
|
Reference in New Issue
Block a user