mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Use only section-based ini reading.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user