summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2014-10-28 12:53:22 +1100
committerskidau <skidau@gmail.com>2014-10-28 12:53:22 +1100
commit1630b0c684c837c074e2f5b9dbf5b45554dfc43e (patch)
tree56f0fb651ba36dbbf856a6f5e0b3ef84e62aa505 /Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
parentb13ba0680c5a717d43becd9c50dd739ff64d7c01 (diff)
parentdaf977e84e82d5687bdad7589541319b4288a5dd (diff)
Merge pull request #1291 from skidau/debugger-step-out
Dolphin debugger enhancements
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
index a25800f372..4e22b8fbdf 100644
--- a/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
@@ -19,6 +19,7 @@
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
+#include "Core/ConfigManager.h"
#include "Core/HW/Memmap.h"
#include "Core/PowerPC/PowerPC.h"
#include "DolphinWX/WxUtils.h"
@@ -45,9 +46,9 @@ public:
{
SetToolBitmapSize(wxSize(24, 24));
- m_Bitmaps[Toolbar_Delete] = wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(24, 24));
- m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(24, 24));
- m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24));
+ m_Bitmaps[Toolbar_Delete] = wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(16, 16));
+ m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(16, 16));
+ m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(16, 16));
AddTool(ID_DELETE, _("Delete"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE);
@@ -66,7 +67,7 @@ public:
}
AddTool(ID_LOAD, _("Load"), m_Bitmaps[Toolbar_Delete]);
- Bind(wxEVT_TOOL, &CBreakPointWindow::LoadAll, parent, ID_LOAD);
+ Bind(wxEVT_TOOL, &CBreakPointWindow::Event_LoadAll, parent, ID_LOAD);
AddTool(ID_SAVE, _("Save"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_TOOL, &CBreakPointWindow::Event_SaveAll, parent, ID_SAVE);
@@ -112,7 +113,7 @@ CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent
m_BreakPointListView = new CBreakPointView(this, wxID_ANY);
m_mgr.AddPane(new CBreakPointBar(this, wxID_ANY), wxAuiPaneInfo().ToolbarPane().Top().
- LeftDockable(false).RightDockable(false).BottomDockable(false).Floatable(false));
+ LeftDockable(true).RightDockable(true).BottomDockable(false).Floatable(false));
m_mgr.AddPane(m_BreakPointListView, wxAuiPaneInfo().CenterPane());
m_mgr.Update();
}
@@ -180,32 +181,38 @@ void CBreakPointWindow::SaveAll()
{
// simply dump all to bp/mc files in a way we can read again
IniFile ini;
- if (ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)))
- {
- ini.SetLines("BreakPoints", PowerPC::breakpoints.GetStrings());
- ini.SetLines("MemoryChecks", PowerPC::memchecks.GetStrings());
- ini.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
- }
+ ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false);
+ ini.SetLines("BreakPoints", PowerPC::breakpoints.GetStrings());
+ ini.SetLines("MemoryChecks", PowerPC::memchecks.GetStrings());
+ ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
+}
+
+void CBreakPointWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event))
+{
+ LoadAll();
+ return;
}
-void CBreakPointWindow::LoadAll(wxCommandEvent& WXUNUSED(event))
+void CBreakPointWindow::LoadAll()
{
IniFile ini;
BreakPoints::TBreakPointsStr newbps;
MemChecks::TMemChecksStr newmcs;
- if (!ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)))
+ if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false))
{
return;
}
if (ini.GetLines("BreakPoints", &newbps, false))
{
+ PowerPC::breakpoints.Clear();
PowerPC::breakpoints.AddFromStrings(newbps);
}
if (ini.GetLines("MemoryChecks", &newmcs, false))
{
+ PowerPC::memchecks.Clear();
PowerPC::memchecks.AddFromStrings(newmcs);
}