Use only section-based ini reading.

This commit is contained in:
Lioncash
2014-06-16 01:12:43 -04:00
parent 7416b9cdb4
commit f05d3f6e5d
24 changed files with 742 additions and 661 deletions

View File

@ -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);
}