diff --git a/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp b/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp index 7967436b95..76f981d4d8 100644 --- a/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp +++ b/Source/Core/Core/Src/HW/SI_DeviceGBA.cpp @@ -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); } diff --git a/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp b/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp index c1831ada07..86a597794e 100644 --- a/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp +++ b/Source/Core/DebuggerWX/Src/BreakPointDlg.cpp @@ -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"))); } diff --git a/Source/Core/DebuggerWX/Src/BreakpointView.cpp b/Source/Core/DebuggerWX/Src/BreakpointView.cpp index bc1588fdf0..b8257ae219 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointView.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointView.cpp @@ -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(); } diff --git a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp index 8dd3e45dc0..0e009f7591 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp @@ -23,7 +23,6 @@ #include "BreakPointDlg.h" #include "MemoryCheckDlg.h" #include "Host.h" -#include "IniFile.h" #include "Debugger/Debugger_BreakPoints.h" // for TMemCheck #include diff --git a/Source/Core/DebuggerWX/Src/CodeView.cpp b/Source/Core/DebuggerWX/Src/CodeView.cpp index 032ba2bba3..3625ffde53 100644 --- a/Source/Core/DebuggerWX/Src/CodeView.cpp +++ b/Source/Core/DebuggerWX/Src/CodeView.cpp @@ -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; diff --git a/Source/Core/DebuggerWX/Src/CodeView.h b/Source/Core/DebuggerWX/Src/CodeView.h index cac3b0902d..a139941de1 100644 --- a/Source/Core/DebuggerWX/Src/CodeView.h +++ b/Source/Core/DebuggerWX/Src/CodeView.h @@ -23,7 +23,6 @@ #include "Debugger/DebugInterface.h" #include -#include DECLARE_EVENT_TYPE(wxEVT_CODEVIEW_CHANGE, -1); diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index 18d50db5cf..9c6ee31c9f 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -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() diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.h b/Source/Core/DebuggerWX/Src/CodeWindow.h index e302026896..8523962f09 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.h +++ b/Source/Core/DebuggerWX/Src/CodeWindow.h @@ -22,10 +22,8 @@ #include #include #include -#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); diff --git a/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp b/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp index 63d66acad1..5c9fc1ffd9 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp @@ -28,11 +28,11 @@ #include #include #include +#include // 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(); +} diff --git a/Source/Core/DebuggerWX/Src/Debugger.h b/Source/Core/DebuggerWX/Src/Debugger.h index 2b10c6b8d0..8a383d89ab 100644 --- a/Source/Core/DebuggerWX/Src/Debugger.h +++ b/Source/Core/DebuggerWX/Src/Debugger.h @@ -34,7 +34,12 @@ enum #define USE_XPM_BITMAPS 1 #include -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 diff --git a/Source/Core/DebuggerWX/Src/JitWindow.cpp b/Source/Core/DebuggerWX/Src/JitWindow.cpp index b4b54d3ffa..77c6d26770 100644 --- a/Source/Core/DebuggerWX/Src/JitWindow.cpp +++ b/Source/Core/DebuggerWX/Src/JitWindow.cpp @@ -17,7 +17,6 @@ #include "Debugger.h" -#include "IniFile.h" #include #include diff --git a/Source/Core/DebuggerWX/Src/JitWindow.h b/Source/Core/DebuggerWX/Src/JitWindow.h index 77bef6c2d7..334a05df07 100644 --- a/Source/Core/DebuggerWX/Src/JitWindow.h +++ b/Source/Core/DebuggerWX/Src/JitWindow.h @@ -27,7 +27,6 @@ #include "Debugger.h" #include "MemoryView.h" #include "Thread.h" -#include "IniFile.h" #include "CoreParameter.h" diff --git a/Source/Core/DebuggerWX/Src/LogWindow.cpp b/Source/Core/DebuggerWX/Src/LogWindow.cpp index 252d0411fc..2e9cab2ee6 100644 --- a/Source/Core/DebuggerWX/Src/LogWindow.cpp +++ b/Source/Core/DebuggerWX/Src/LogWindow.cpp @@ -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); } - - diff --git a/Source/Core/DebuggerWX/Src/MemoryCheckDlg.cpp b/Source/Core/DebuggerWX/Src/MemoryCheckDlg.cpp index 135d019703..3008821a84 100644 --- a/Source/Core/DebuggerWX/Src/MemoryCheckDlg.cpp +++ b/Source/Core/DebuggerWX/Src/MemoryCheckDlg.cpp @@ -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*/) diff --git a/Source/Core/DebuggerWX/Src/MemoryView.cpp b/Source/Core/DebuggerWX/Src/MemoryView.cpp index 338bbeef94..2509e3a836 100644 --- a/Source/Core/DebuggerWX/Src/MemoryView.cpp +++ b/Source/Core/DebuggerWX/Src/MemoryView.cpp @@ -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; diff --git a/Source/Core/DebuggerWX/Src/MemoryView.h b/Source/Core/DebuggerWX/Src/MemoryView.h index 3579114d29..6463f9b1af 100644 --- a/Source/Core/DebuggerWX/Src/MemoryView.h +++ b/Source/Core/DebuggerWX/Src/MemoryView.h @@ -22,7 +22,6 @@ #include "Common.h" #include "Debugger/DebugInterface.h" -#include class CMemoryView : public wxControl diff --git a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp index 8f550fd486..0f9375fb6f 100644 --- a/Source/Core/DebuggerWX/Src/MemoryWindow.cpp +++ b/Source/Core/DebuggerWX/Src/MemoryWindow.cpp @@ -17,7 +17,6 @@ #include "Debugger.h" -#include "IniFile.h" #include #include diff --git a/Source/Core/DebuggerWX/Src/RegisterView.cpp b/Source/Core/DebuggerWX/Src/RegisterView.cpp index fac3287702..2444e98b96 100644 --- a/Source/Core/DebuggerWX/Src/RegisterView.cpp +++ b/Source/Core/DebuggerWX/Src/RegisterView.cpp @@ -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(); } diff --git a/Source/Core/DebuggerWX/Src/RegisterWindow.cpp b/Source/Core/DebuggerWX/Src/RegisterWindow.cpp index 342a93d445..2ae996716c 100644 --- a/Source/Core/DebuggerWX/Src/RegisterWindow.cpp +++ b/Source/Core/DebuggerWX/Src/RegisterWindow.cpp @@ -19,7 +19,6 @@ #include "RegisterWindow.h" #include "PowerPC/PowerPC.h" #include "RegisterView.h" -#include "IniFile.h" extern const char* GetGRPName(unsigned int index); diff --git a/Source/Core/DebuggerWX/Src/RegisterWindow.h b/Source/Core/DebuggerWX/Src/RegisterWindow.h index 3177471a55..9807189ff9 100644 --- a/Source/Core/DebuggerWX/Src/RegisterWindow.h +++ b/Source/Core/DebuggerWX/Src/RegisterWindow.h @@ -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 diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index 18054d54ad..63ac7fdfe8 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -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; diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 7a63afd31d..6b23f1b6e4 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -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(""),wxT("Memory Card"), wxT("Mic")}; + static const int numSlotDevices = sizeof(SlotDevices)/sizeof(wxString); const wxString SP1Devices[] = {wxT(""),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(""),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(""), 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;