Allow changing of the debugger font and some cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2127 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
81631d8452
commit
60b25def18
|
@ -55,9 +55,9 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength)
|
|||
//Recieve 0x04
|
||||
//Recieve from lower 8bits of SIOSTAT register
|
||||
|
||||
*(u32*)&_pBuffer[0] = SI_GBA|2;
|
||||
*(u32*)&_pBuffer[0] = SI_GBA;//|2;
|
||||
iPosition = _iLength; // break the while loop
|
||||
LOG(SERIALINTERFACE, "GBA CMD_RESET");
|
||||
LOG(SERIALINTERFACE, "GBA %i CMD_RESET", this->m_iDeviceNumber);
|
||||
}
|
||||
break;
|
||||
case CMD_STATUS:
|
||||
|
@ -68,9 +68,9 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength)
|
|||
//Recieve 0x04
|
||||
//Recieve from lower 8bits of SIOSTAT register
|
||||
|
||||
*(u32*)&_pBuffer[0] = SI_GBA|8;
|
||||
*(u32*)&_pBuffer[0] = SI_GBA;//|8;
|
||||
iPosition = _iLength; // break the while loop
|
||||
LOG(SERIALINTERFACE, "GBA CMD_STATUS");
|
||||
LOG(SERIALINTERFACE, "GBA %i CMD_STATUS", this->m_iDeviceNumber);
|
||||
}
|
||||
break;
|
||||
case CMD_WRITE:
|
||||
|
@ -83,7 +83,7 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength)
|
|||
//Send to Upper 8bits of JOY_RECV_H
|
||||
//Receive from lower 8bits of SIOSTAT register
|
||||
|
||||
LOG(SERIALINTERFACE, "GBA CMD_WRITE");
|
||||
LOG(SERIALINTERFACE, "GBA %i CMD_WRITE", this->m_iDeviceNumber);
|
||||
}
|
||||
break;
|
||||
case CMD_READ:
|
||||
|
@ -94,14 +94,14 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength)
|
|||
//Receive from Upper 8bits of JOY_TRANS_L
|
||||
//Receive from Lower 8bits of JOY_TRANS_H
|
||||
//Receive from Upper 8bits of JOY_TRANS_H
|
||||
//Receive from lower 8bits of SIOSTAT register
|
||||
//Receive from lower 8bits of SIOSTAT register
|
||||
|
||||
LOG(SERIALINTERFACE, "GBA CMD_READ");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
LOG(SERIALINTERFACE, "unknown GBA command (0x%x)", command);
|
||||
LOG(SERIALINTERFACE, "GBA %i unknown command (0x%x)", this->m_iDeviceNumber, command);
|
||||
iPosition = _iLength;
|
||||
}
|
||||
break;
|
||||
|
@ -117,7 +117,7 @@ int CSIDevice_GBA::RunBuffer(u8* _pBuffer, int _iLength)
|
|||
bool
|
||||
CSIDevice_GBA::GetData(u32& _Hi, u32& _Low)
|
||||
{
|
||||
LOG(SERIALINTERFACE, "GBA GetData Hi: 0x%x Low: 0x%x", _Hi, _Low);
|
||||
LOG(SERIALINTERFACE, "GBA %i GetData Hi: 0x%x Low: 0x%x", this->m_iDeviceNumber, _Hi, _Low);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -128,5 +128,5 @@ CSIDevice_GBA::GetData(u32& _Hi, u32& _Low)
|
|||
void
|
||||
CSIDevice_GBA::SendCommand(u32 _Cmd)
|
||||
{
|
||||
LOG(SERIALINTERFACE, "GBA SendCommand: (0x%x)", _Cmd);
|
||||
LOG(SERIALINTERFACE, "GBA %i SendCommand: (0x%x)", this->m_iDeviceNumber, _Cmd);
|
||||
}
|
||||
|
|
|
@ -50,19 +50,14 @@ void BreakPointDlg::CreateGUIControls()
|
|||
|
||||
|
||||
wxStaticText* WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Address"), wxPoint(8,24), wxDefaultSize, 0, wxT("WxStaticText1"));
|
||||
WxStaticText1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pButtonOK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(192,64), wxSize(73,25), 0, wxDefaultValidator, wxT("OK"));
|
||||
m_pButtonOK->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pButtonCancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(112,64), wxSize(73,25), 0, wxDefaultValidator, wxT("Cancel"));
|
||||
m_pButtonCancel->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pEditAddress = new wxTextCtrl(this, ID_ADDRESS, wxT("80000000"), wxPoint(56,24), wxSize(197,20), 0, wxDefaultValidator, wxT("WxEdit1"));
|
||||
m_pEditAddress->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
wxStaticBox* WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Address"), wxPoint(0,0), wxSize(265,57));
|
||||
WxStaticBox1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ END_EVENT_TABLE()
|
|||
CBreakPointView::CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
|
||||
: wxListCtrl(parent, id, pos, size, style)
|
||||
{
|
||||
SetFont(DefaultFont);
|
||||
SetFont(DebuggerFont);
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "BreakPointDlg.h"
|
||||
#include "MemoryCheckDlg.h"
|
||||
#include "Host.h"
|
||||
#include "IniFile.h"
|
||||
#include "Debugger/Debugger_BreakPoints.h" // for TMemCheck
|
||||
|
||||
#include <wx/mstream.h>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Debugger.h"
|
||||
//#include "Debugger.h"
|
||||
#include "Debugger/PPCDebugInterface.h"
|
||||
#include "PowerPC/SymbolDB.h"
|
||||
#include "HW/Memmap.h" // for Write_U32
|
||||
|
@ -366,7 +366,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
|||
// -------------------------
|
||||
wxPaintDC dc(this);
|
||||
wxRect rc = GetClientRect();
|
||||
dc.SetFont(DefaultFont);
|
||||
dc.SetFont(DebuggerFont);
|
||||
struct branch
|
||||
{
|
||||
int src, dst, srcAddr;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "Debugger/DebugInterface.h"
|
||||
|
||||
#include <vector>
|
||||
#include <wx/wx.h>
|
||||
|
||||
DECLARE_EVENT_TYPE(wxEVT_CODEVIEW_CHANGE, -1);
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
// ugly that this lib included code from the main
|
||||
#include "../../DolphinWX/Src/Globals.h"
|
||||
|
||||
#include "IniFile.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "Debugger.h"
|
||||
|
@ -75,20 +74,16 @@ extern "C" // Bitmaps
|
|||
#include "../resources/toolbar_delete.c"
|
||||
#include "../resources/toolbar_add_breakpoint.c"
|
||||
}
|
||||
///////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Declarations and definitions
|
||||
// ¯¯¯¯¯¯¯¯¯¯
|
||||
// and here are the classes
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class CPluginInfo;
|
||||
class CPluginManager;
|
||||
//extern DynamicLibrary Common::CPlugin;
|
||||
//extern CPluginManager CPluginManager::m_Instance;
|
||||
|
||||
static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
||||
|
||||
// The default font
|
||||
wxFont DebuggerFont = wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false, wxT("monospace"));
|
||||
|
||||
|
||||
#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name, sizeof(name))
|
||||
inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length)
|
||||
|
@ -96,12 +91,8 @@ inline wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length)
|
|||
wxMemoryInputStream is(data, length);
|
||||
return(wxBitmap(wxImage(is, wxBITMAP_TYPE_ANY, -1), -1));
|
||||
}
|
||||
///////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Event table
|
||||
// ¯¯¯¯¯¯¯¯¯¯
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
||||
EVT_LISTBOX(ID_SYMBOLLIST, CCodeWindow::OnSymbolListChange)
|
||||
EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
|
||||
|
@ -130,13 +121,14 @@ 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_LOGWINDOW, CCodeWindow::OnToggleLogWindow) // Views
|
||||
EVT_MENU(IDM_REGISTERWINDOW, CCodeWindow::OnToggleRegisterWindow)
|
||||
EVT_MENU(IDM_BREAKPOINTWINDOW, CCodeWindow::OnToggleBreakPointWindow)
|
||||
EVT_MENU(IDM_MEMORYWINDOW, CCodeWindow::OnToggleMemoryWindow)
|
||||
EVT_MENU(IDM_JITWINDOW, CCodeWindow::OnToggleJitWindow)
|
||||
EVT_MENU(IDM_SOUNDWINDOW, CCodeWindow::OnToggleSoundWindow)
|
||||
EVT_MENU(IDM_VIDEOWINDOW, CCodeWindow::OnToggleVideoWindow)
|
||||
EVT_MENU(IDM_FONTPICKER, CCodeWindow::OnChangeFont)
|
||||
|
||||
EVT_MENU(IDM_CLEARSYMBOLS, CCodeWindow::OnSymbolsMenu)
|
||||
EVT_MENU(IDM_LOADMAPFILE, CCodeWindow::OnSymbolsMenu)
|
||||
|
@ -164,12 +156,10 @@ BEGIN_EVENT_TABLE(CCodeWindow, wxFrame)
|
|||
|
||||
EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)
|
||||
END_EVENT_TABLE()
|
||||
///////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Class, input event handler and host message handler
|
||||
// ¯¯¯¯¯¯¯¯¯¯
|
||||
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, wxWindow* parent, wxWindowID id,
|
||||
const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
||||
: wxFrame(parent, id, title, pos, size, style)
|
||||
|
@ -297,6 +287,11 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
|
|||
// --------------
|
||||
void CCodeWindow::Load_( IniFile &ini )
|
||||
{
|
||||
// The font to override DebuggerFont with
|
||||
std::string fontDesc;
|
||||
ini.Get("ShowOnStart", "DebuggerFont", &fontDesc);
|
||||
if (!fontDesc.empty())
|
||||
DebuggerFont.SetNativeFontInfoUserDesc(wxString(fontDesc.c_str(), wxConvUTF8));
|
||||
|
||||
// Decide what windows to use
|
||||
ini.Get("ShowOnStart", "LogWindow", &bLogWindow, true);
|
||||
|
@ -332,6 +327,8 @@ void CCodeWindow::Save(IniFile &ini) const
|
|||
ini.Set("CodeWindow", "w", GetSize().GetWidth());
|
||||
ini.Set("CodeWindow", "h", GetSize().GetHeight());
|
||||
|
||||
ini.Set("ShowOnStart", "DebuggerFont", std::string(DebuggerFont.GetNativeFontInfoUserDesc().mb_str()));
|
||||
|
||||
// Boot to pause or not
|
||||
ini.Set("ShowOnStart", "AutomaticStart", GetMenuBar()->IsChecked(IDM_AUTOMATICSTART));
|
||||
ini.Set("ShowOnStart", "BootToPause", GetMenuBar()->IsChecked(IDM_BOOTTOPAUSE));
|
||||
|
@ -346,7 +343,6 @@ void CCodeWindow::Save(IniFile &ini) const
|
|||
ini.Set("ShowOnStart", "VideoWindow", GetMenuBar()->IsChecked(IDM_VIDEOWINDOW));
|
||||
}
|
||||
|
||||
|
||||
void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStartupParameter)
|
||||
{
|
||||
CreateMenu(_LocalCoreStartupParameter);
|
||||
|
@ -531,6 +527,9 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
|
|||
wxMenuItem* pVideo = pDebugDialogs->Append(IDM_VIDEOWINDOW, _T("&Video"), wxEmptyString, wxITEM_CHECK);
|
||||
pVideo->Check(bVideoWindow);
|
||||
|
||||
pDebugDialogs->AppendSeparator();
|
||||
wxMenuItem* pFontPicker = pDebugDialogs->Append(IDM_FONTPICKER, _T("&Font..."), wxEmptyString, wxITEM_NORMAL);
|
||||
|
||||
pMenuBar->Append(pDebugDialogs, _T("&Views"));
|
||||
// -----------------
|
||||
|
||||
|
@ -919,6 +918,12 @@ void CCodeWindow::UpdateButtonStates()
|
|||
GetMenuBar()->Enable(IDM_JITSROFF, Pause);
|
||||
|
||||
GetMenuBar()->Enable(IDM_CLEARCODECACHE, Pause); // JIT Menu
|
||||
|
||||
// Update Fonts
|
||||
callstack->SetFont(DebuggerFont);
|
||||
symbols->SetFont(DebuggerFont);
|
||||
callers->SetFont(DebuggerFont);
|
||||
calls->SetFont(DebuggerFont);
|
||||
}
|
||||
|
||||
void CCodeWindow::RecreateToolbar()
|
||||
|
|
|
@ -22,10 +22,8 @@
|
|||
#include <wx/dialog.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/listbox.h>
|
||||
#include "Debugger.h"
|
||||
#include "CodeView.h"
|
||||
#include "Thread.h"
|
||||
|
||||
#include "Thread.h"
|
||||
#include "CoreParameter.h"
|
||||
|
||||
class CRegisterWindow;
|
||||
|
@ -34,7 +32,6 @@ class CBreakPointWindow;
|
|||
class CMemoryWindow;
|
||||
class CJitWindow;
|
||||
class CCodeView;
|
||||
class IniFile;
|
||||
|
||||
class CCodeWindow
|
||||
: public wxFrame
|
||||
|
@ -86,6 +83,7 @@ class CCodeWindow
|
|||
IDM_JITSROFF,
|
||||
|
||||
// Views
|
||||
IDM_FONTPICKER,
|
||||
IDM_LOGWINDOW,
|
||||
IDM_REGISTERWINDOW,
|
||||
IDM_BREAKPOINTWINDOW,
|
||||
|
@ -201,6 +199,7 @@ class CCodeWindow
|
|||
void OnToggleJitWindow(wxCommandEvent& event);
|
||||
void OnToggleSoundWindow(wxCommandEvent& event);
|
||||
void OnToggleVideoWindow(wxCommandEvent& event);
|
||||
void OnChangeFont(wxCommandEvent& event);
|
||||
|
||||
void OnHostMessage(wxCommandEvent& event);
|
||||
void OnSymbolsMenu(wxCommandEvent& event);
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
#include <wx/thread.h>
|
||||
#include <wx/mstream.h>
|
||||
#include <wx/tipwin.h>
|
||||
#include <wx/fontdlg.h>
|
||||
|
||||
// ugly that this lib included code from the main
|
||||
#include "../../DolphinWX/Src/Globals.h"
|
||||
|
||||
#include "IniFile.h"
|
||||
#include "Host.h"
|
||||
|
||||
#include "Debugger.h"
|
||||
|
@ -497,4 +497,14 @@ void CCodeWindow::OnToggleMemoryWindow(wxCommandEvent& event)
|
|||
}
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Change the global DebuggerFont
|
||||
void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
||||
{
|
||||
wxFontData data;
|
||||
data.SetInitialFont(GetFont());
|
||||
|
||||
wxFontDialog dialog(this, data);
|
||||
if ( dialog.ShowModal() == wxID_OK )
|
||||
DebuggerFont = dialog.GetFontData().GetChosenFont();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,12 @@ enum
|
|||
#define USE_XPM_BITMAPS 1
|
||||
|
||||
#include <wx/wx.h>
|
||||
static wxFont DefaultFont = wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false, wxT("monospace"));
|
||||
|
||||
#include "IniFile.h"
|
||||
|
||||
// Defined in CodeWindow.cpp
|
||||
extern wxFont DebuggerFont;
|
||||
|
||||
|
||||
// define this to use XPMs everywhere (by default, BMPs are used under Win)
|
||||
// BMPs use less space, but aren't compiled into the executable on other platforms
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
#include "Debugger.h"
|
||||
|
||||
#include "IniFile.h"
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "Debugger.h"
|
||||
#include "MemoryView.h"
|
||||
#include "Thread.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
#include "CoreParameter.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "Core.h" // for Core::GetState()
|
||||
#include "LogWindow.h"
|
||||
#include "Console.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(CLogWindow, wxDialog)
|
||||
EVT_BUTTON(IDM_SUBMITCMD, CLogWindow::OnSubmit)
|
||||
|
@ -84,7 +83,9 @@ CLogWindow::CLogWindow(wxWindow* parent)
|
|||
// right windows -----------------------------------------------------
|
||||
m_log = new wxTextCtrl(this, IDM_LOG, _T(""), wxDefaultPosition, wxSize(600, 120),
|
||||
wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
|
||||
m_log->SetFont(DebuggerFont);
|
||||
m_cmdline = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition);
|
||||
m_cmdline->SetFont(DebuggerFont);
|
||||
wxButton* btn = new wxButton(this, IDM_SUBMITCMD, _T("Submit"));
|
||||
|
||||
sizerTop->Add(new wxButton(this, IDM_UPDATELOG, _T("Update")));
|
||||
|
@ -510,6 +511,6 @@ void CLogWindow::UpdateLog()
|
|||
m_log->SetValue(wxString::FromAscii(m_logBuffer));
|
||||
m_log->SetInsertionPoint(p - m_logBuffer - 1);
|
||||
m_log->ShowPosition( m_log->GetLastPosition()); // show last line
|
||||
m_log->SetFont(DebuggerFont);
|
||||
m_cmdline->SetFont(DebuggerFont);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,34 +46,24 @@ void MemoryCheckDlg::CreateGUIControls()
|
|||
Center();
|
||||
|
||||
m_pButtonCancel = new wxButton(this, ID_CANCEL, wxT("Cancel"), wxPoint(248,64), wxSize(73,25), 0, wxDefaultValidator, wxT("Cancel"));
|
||||
m_pButtonCancel->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pButtonOK = new wxButton(this, ID_OK, wxT("OK"), wxPoint(328,64), wxSize(73,25), 0, wxDefaultValidator, wxT("OK"));
|
||||
m_pButtonOK->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pReadFlag = new wxCheckBox(this, ID_READ_FLAG, wxT("Read"), wxPoint(336,33), wxSize(57,15), 0, wxDefaultValidator, wxT("Read"));
|
||||
m_pReadFlag->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pWriteFlag = new wxCheckBox(this, ID_WRITE_FLAG, wxT("Write"), wxPoint(336,16), wxSize(57,17), 0, wxDefaultValidator, wxT("WxCheckBox1"));
|
||||
m_pWriteFlag->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
wxStaticBox* WxStaticBox2 = new wxStaticBox(this, ID_WXSTATICBOX2, wxT("Break On"), wxPoint(328,0), wxSize(73,57));
|
||||
WxStaticBox2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
wxStaticText* WxStaticText2 = new wxStaticText(this, ID_WXSTATICTEXT2, wxT("End"), wxPoint(168,24), wxDefaultSize, 0, wxT("WxStaticText2"));
|
||||
WxStaticText2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
wxStaticText* WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Start"), wxPoint(8,24), wxDefaultSize, 0, wxT("WxStaticText1"));
|
||||
WxStaticText1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pEditStartAddress = new wxTextCtrl(this, ID_EDIT_START_ADDR, wxT("80000000"), wxPoint(40,24), wxSize(109,20), 0, wxDefaultValidator, wxT("WxEdit1"));
|
||||
m_pEditStartAddress->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
m_pEditEndAddress = new wxTextCtrl(this, ID_EDIT_END_ADDRESS, wxT("80000000"), wxPoint(200,24), wxSize(109,20), 0, wxDefaultValidator, wxT("WxEdit2"));
|
||||
m_pEditEndAddress->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
|
||||
wxStaticBox* WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Address Range"), wxPoint(0,0), wxSize(321,57));
|
||||
WxStaticBox1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma")));
|
||||
}
|
||||
|
||||
void MemoryCheckDlg::OnClose(wxCloseEvent& /*event*/)
|
||||
|
|
|
@ -204,9 +204,9 @@ void CMemoryView::OnErase(wxEraseEvent& event)
|
|||
void CMemoryView::OnPaint(wxPaintEvent& event)
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
int fontSize = 9;
|
||||
wxRect rc = GetClientRect();
|
||||
dc.SetFont(DefaultFont);
|
||||
dc.SetFont(DebuggerFont);
|
||||
int fontSize = DebuggerFont.GetPointSize();
|
||||
struct branch
|
||||
{
|
||||
int src, dst, srcAddr;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "Common.h"
|
||||
#include "Debugger/DebugInterface.h"
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
class CMemoryView
|
||||
: public wxControl
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
#include "Debugger.h"
|
||||
|
||||
#include "IniFile.h"
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
|
|
@ -92,7 +92,7 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind)
|
|||
wxGridCellAttr *attr = new wxGridCellAttr();
|
||||
|
||||
attr->SetBackgroundColour(wxColour(wxT("#FFFFFF")));
|
||||
attr->SetFont(DefaultFont);
|
||||
attr->SetFont(DebuggerFont);
|
||||
|
||||
switch (col) {
|
||||
case 1:
|
||||
|
@ -120,10 +120,9 @@ CRegisterView::CRegisterView(wxWindow *parent, wxWindowID id)
|
|||
: wxGrid(parent, id)
|
||||
{
|
||||
SetTable(new CRegTable(), true);
|
||||
EnableGridLines(false);
|
||||
SetRowLabelSize(0);
|
||||
SetColLabelSize(0);
|
||||
DisableDragGridSize();
|
||||
DisableDragRowSize();
|
||||
|
||||
AutoSizeColumns();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "RegisterWindow.h"
|
||||
#include "PowerPC/PowerPC.h"
|
||||
#include "RegisterView.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
extern const char* GetGRPName(unsigned int index);
|
||||
|
||||
|
|
|
@ -21,37 +21,35 @@
|
|||
class CRegisterView;
|
||||
class IniFile;
|
||||
|
||||
#undef RegisterWindow_STYLE
|
||||
#define RegisterWindow_STYLE wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX
|
||||
|
||||
class CRegisterWindow
|
||||
: public wxDialog
|
||||
{
|
||||
private:
|
||||
public:
|
||||
CRegisterWindow(wxWindow* parent,
|
||||
wxWindowID id = 1,
|
||||
const wxString& title = wxT("Registers"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
|
||||
virtual ~CRegisterWindow();
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
void Save(IniFile& _IniFile) const;
|
||||
void Load(IniFile& _IniFile);
|
||||
|
||||
public:
|
||||
|
||||
CRegisterWindow(wxWindow* parent, wxWindowID id = 1, const wxString& title = wxT("Registers"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = RegisterWindow_STYLE);
|
||||
virtual ~CRegisterWindow();
|
||||
|
||||
void Save(IniFile& _IniFile) const;
|
||||
void Load(IniFile& _IniFile);
|
||||
|
||||
void NotifyUpdate();
|
||||
void NotifyUpdate();
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
enum
|
||||
{
|
||||
ID_GPR = 1002
|
||||
};
|
||||
enum
|
||||
{
|
||||
ID_GPR = 1002
|
||||
};
|
||||
|
||||
CRegisterView* m_GPRGridView;
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CreateGUIControls();
|
||||
CRegisterView* m_GPRGridView;
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CreateGUIControls();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -62,16 +62,8 @@
|
|||
#include "../../../Branches/MusicMod/Main/Src/Main.h" // MusicMod
|
||||
#endif
|
||||
#endif
|
||||
/////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Declarations and definitions
|
||||
// ----------------
|
||||
static std::string s_DataBasePath_EUR = "Data_EUR";
|
||||
static std::string s_DataBasePath_USA = "Data_USA";
|
||||
static std::string s_DataBasePath_JAP = "Data_JAP";
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
extern CFrame* main_frame;
|
||||
extern CCodeWindow* g_pCodeWindow;
|
||||
|
|
|
@ -310,10 +310,12 @@ void CConfigMain::CreateGUIControls()
|
|||
GCEXIDeviceText[2] = new wxStaticText(GamecubePage, ID_GC_EXIDEVICE_SP1_TEXT, wxT("SP1 "), wxDefaultPosition, wxDefaultSize);
|
||||
GCEXIDeviceText[2]->SetToolTip(wxT("Serial Port 1 - This is the port the network adapter uses"));
|
||||
const wxString SlotDevices[] = {wxT("<Nothing>"),wxT("Memory Card"), wxT("Mic")};
|
||||
static const int numSlotDevices = sizeof(SlotDevices)/sizeof(wxString);
|
||||
const wxString SP1Devices[] = {wxT("<Nothing>"),wxT("BBA")};
|
||||
GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA, wxDefaultPosition, wxDefaultSize, 3, SlotDevices, 0, wxDefaultValidator);
|
||||
GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB, wxDefaultPosition, wxDefaultSize, 3, SlotDevices, 0, wxDefaultValidator);
|
||||
GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1, wxDefaultPosition, wxDefaultSize, 2, SP1Devices, 0, wxDefaultValidator);
|
||||
static const int numSP1Devices = sizeof(SP1Devices)/sizeof(wxString);
|
||||
GCEXIDevice[0] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTA, wxDefaultPosition, wxDefaultSize, numSlotDevices, SlotDevices, 0, wxDefaultValidator);
|
||||
GCEXIDevice[1] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SLOTB, wxDefaultPosition, wxDefaultSize, numSlotDevices, SlotDevices, 0, wxDefaultValidator);
|
||||
GCEXIDevice[2] = new wxChoice(GamecubePage, ID_GC_EXIDEVICE_SP1, wxDefaultPosition, wxDefaultSize, numSP1Devices, SP1Devices, 0, wxDefaultValidator);
|
||||
GCMemcardPath[0] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTA_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
|
||||
GCMemcardPath[1] = new wxButton(GamecubePage, ID_GC_EXIDEVICE_SLOTB_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
|
||||
for (int i = 0; i < 3; ++i)
|
||||
|
@ -338,15 +340,18 @@ void CConfigMain::CreateGUIControls()
|
|||
GCSIDeviceText[1] = new wxStaticText(GamecubePage, ID_GC_SIDEVICE_TEXT, wxT("Port 2"), wxDefaultPosition, wxDefaultSize);
|
||||
GCSIDeviceText[2] = new wxStaticText(GamecubePage, ID_GC_SIDEVICE_TEXT, wxT("Port 3"), wxDefaultPosition, wxDefaultSize);
|
||||
GCSIDeviceText[3] = new wxStaticText(GamecubePage, ID_GC_SIDEVICE_TEXT, wxT("Port 4"), wxDefaultPosition, wxDefaultSize);
|
||||
const wxString SIDevices[] = {wxT("<Nothing>"),wxT("Standard Controller")};
|
||||
GCSIDevice[0] = new wxChoice(GamecubePage, ID_GC_SIDEVICE0, wxDefaultPosition, wxDefaultSize, 2, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1, wxDefaultPosition, wxDefaultSize, 2, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[2] = new wxChoice(GamecubePage, ID_GC_SIDEVICE2, wxDefaultPosition, wxDefaultSize, 2, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[3] = new wxChoice(GamecubePage, ID_GC_SIDEVICE3, wxDefaultPosition, wxDefaultSize, 2, SIDevices, 0, wxDefaultValidator);
|
||||
const wxString SIDevices[] = {wxT("<Nothing>"), wxT("Standard Controller"), wxT("GBA")};
|
||||
static const int numSIDevices = sizeof(SIDevices)/sizeof(wxString);
|
||||
GCSIDevice[0] = new wxChoice(GamecubePage, ID_GC_SIDEVICE0, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[1] = new wxChoice(GamecubePage, ID_GC_SIDEVICE1, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[2] = new wxChoice(GamecubePage, ID_GC_SIDEVICE2, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
|
||||
GCSIDevice[3] = new wxChoice(GamecubePage, ID_GC_SIDEVICE3, wxDefaultPosition, wxDefaultSize, numSIDevices, SIDevices, 0, wxDefaultValidator);
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
if (SConfig::GetInstance().m_SIDevice[i] == SI_GC_CONTROLLER)
|
||||
GCSIDevice[i]->SetStringSelection(SIDevices[1]);
|
||||
else if (SConfig::GetInstance().m_SIDevice[i] == SI_GBA)
|
||||
GCSIDevice[i]->SetStringSelection(SIDevices[2]);
|
||||
else
|
||||
GCSIDevice[i]->SetStringSelection(SIDevices[0]);
|
||||
}
|
||||
|
@ -697,6 +702,8 @@ void CConfigMain::ChooseSIDevice(std::string deviceName, int deviceNum)
|
|||
TSIDevices tempType;
|
||||
if (deviceName.compare("Standard Controller") == 0)
|
||||
tempType = SI_GC_CONTROLLER;
|
||||
else if (deviceName.compare("GBA") == 0)
|
||||
tempType = SI_GBA;
|
||||
else
|
||||
tempType = SI_DUMMY;
|
||||
|
||||
|
|
Loading…
Reference in New Issue