position and size of the main window are now saved (fixes issue 2035)

Note that running in debug mode (Dolphin.exe -d) still maximizes the window and stores that size aswell.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4879 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st 2010-01-18 18:01:03 +00:00
parent e44e412da8
commit 8fec36b22a
7 changed files with 32 additions and 27 deletions

View file

@ -394,28 +394,13 @@ bool DolphinApp::OnInit()
#endif
#endif
int x = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX;
int y = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY;
int w = SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth;
int h = SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight;
if (UseDebugger)
{
// If we are debugging let user save the main window position and size
IniFile ini;
ini.Load(DEBUGGER_CONFIG_FILE);
int x, y, w, h;
ini.Get("MainWindow", "x", &x, 100);
ini.Get("MainWindow", "y", &y, 100);
ini.Get("MainWindow", "w", &w, 800);
ini.Get("MainWindow", "h", &h, 600);
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title),
wxPoint(x, y), wxSize(w, h), true, UseLogger);
}
else
{
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title),
wxPoint(100, 100), wxSize(800, 600), false, UseLogger);
}
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title),
wxPoint(x, y), wxSize(w, h), UseDebugger, UseLogger);
// ------------
// Check the autoboot options.