summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp
diff options
context:
space:
mode:
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);
}