summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-06-22 17:21:45 +0200
committerPierre Bourdon <delroth@gmail.com>2014-06-22 17:21:45 +0200
commit5dff5773398fab79ca60a0fad4aa90abf683d366 (patch)
tree466db879b91b173e783dc4c524ad237d37c60f4d /Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
parent86d64553910c438031e2e8359f871d31f1caa12b (diff)
parentf05d3f6e5d6da8be530c0cd4ffaaec0382240ec5 (diff)
Merge pull request #500 from lioncash/ini
Use only section-based ini reading.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
index 682a6733a1..fa09024ef3 100644
--- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
+++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
@@ -88,10 +88,11 @@ void GFXDebuggerPanel::SaveSettings() const
GetSize().GetWidth() < 1000 &&
GetSize().GetHeight() < 1000)
{
- file.Set("VideoWindow", "x", GetPosition().x);
- file.Set("VideoWindow", "y", GetPosition().y);
- file.Set("VideoWindow", "w", GetSize().GetWidth());
- file.Set("VideoWindow", "h", GetSize().GetHeight());
+ IniFile::Section* video_window = file.GetOrCreateSection("VideoWindow");
+ video_window->Set("x", GetPosition().x);
+ video_window->Set("y", GetPosition().y);
+ video_window->Set("w", GetSize().GetWidth());
+ video_window->Set("h", GetSize().GetHeight());
}
file.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
@@ -102,11 +103,17 @@ void GFXDebuggerPanel::LoadSettings()
IniFile file;
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
- int x = 100, y = 100, w = 100, h = 100;
- file.Get("VideoWindow", "x", &x, GetPosition().x);
- file.Get("VideoWindow", "y", &y, GetPosition().y);
- file.Get("VideoWindow", "w", &w, GetSize().GetWidth());
- file.Get("VideoWindow", "h", &h, GetSize().GetHeight());
+ int x = 100;
+ int y = 100;
+ int w = 100;
+ int h = 100;
+
+ IniFile::Section* video_window = file.GetOrCreateSection("VideoWindow");
+ video_window->Get("x", &x, GetPosition().x);
+ video_window->Get("y", &y, GetPosition().y);
+ video_window->Get("w", &w, GetSize().GetWidth());
+ video_window->Get("h", &h, GetSize().GetHeight());
+
SetSize(x, y, w, h);
}