summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/WatchWindow.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2014-10-25 00:13:53 +1100
committerskidau <skidau@gmail.com>2014-10-26 14:56:03 +1100
commit8d2931cf1803234ced2429a6bf5dbb8b934e9f38 (patch)
tree7e0606aaeedcaf30191086929c9f21f998ba2ee2 /Source/Core/DolphinWX/Debugger/WatchWindow.cpp
parentb73130af77e4a978e7837a0e40431af768d2f34c (diff)
Breakpoints and watches are now loaded and saved on start/stop.
Saved Breakpoints and watches per game in the game ini.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/WatchWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/WatchWindow.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/Source/Core/DolphinWX/Debugger/WatchWindow.cpp b/Source/Core/DolphinWX/Debugger/WatchWindow.cpp
index dc25d32d4b..ef192b7419 100644
--- a/Source/Core/DolphinWX/Debugger/WatchWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/WatchWindow.cpp
@@ -16,6 +16,7 @@
#include "Common/FileUtil.h"
#include "Common/IniFile.h"
+#include "Core/ConfigManager.h"
#include "Core/PowerPC/PowerPC.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/Debugger/WatchView.h"
@@ -44,7 +45,7 @@ CWatchToolbar(CWatchWindow* parent, const wxWindowID id)
m_Bitmaps[Toolbar_File] = wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(16, 16));
AddTool(ID_LOAD, _("Load"), m_Bitmaps[Toolbar_File]);
- Bind(wxEVT_TOOL, &CWatchWindow::LoadAll, parent, ID_LOAD);
+ Bind(wxEVT_TOOL, &CWatchWindow::Event_LoadAll, parent, ID_LOAD);
AddTool(ID_SAVE, _("Save"), m_Bitmaps[Toolbar_File]);
Bind(wxEVT_TOOL, &CWatchWindow::Event_SaveAll, parent, ID_SAVE);
@@ -87,6 +88,11 @@ CWatchWindow::CWatchWindow(wxWindow* parent, wxWindowID id,
m_mgr.Update();
}
+CWatchWindow::~CWatchWindow()
+{
+ m_mgr.UnInit();
+}
+
void CWatchWindow::NotifyUpdate()
{
if (m_GPRGridView != nullptr)
@@ -101,25 +107,29 @@ void CWatchWindow::Event_SaveAll(wxCommandEvent& WXUNUSED(event))
void CWatchWindow::SaveAll()
{
IniFile ini;
- if (ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)))
- {
- ini.SetLines("Watches", PowerPC::watches.GetStrings());
- ini.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
- }
+ ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false);
+ ini.SetLines("Watches", PowerPC::watches.GetStrings());
+ ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
+}
+
+void CWatchWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event))
+{
+ LoadAll();
}
-void CWatchWindow::LoadAll(wxCommandEvent& WXUNUSED(event))
+void CWatchWindow::LoadAll()
{
IniFile ini;
Watches::TWatchesStr watches;
- 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("Watches", &watches, false))
{
+ PowerPC::watches.Clear();
PowerPC::watches.AddFromStrings(watches);
}