If the saved position is out of screen, start Dolphin in default position.
e.g. When last time you closed Dolphin on a second monitor but now you have ejected that monitor or have changed the position from horizontal tile to vertical tile. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4957 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
efc7cd6581
commit
e3730a2440
|
@ -534,7 +534,6 @@ void CFrame::OnClose(wxCloseEvent& event)
|
|||
// Don't forget the skip or the window won't be destroyed
|
||||
event.Skip();
|
||||
// Save GUI settings
|
||||
if (g_pCodeWindow) g_pCodeWindow->Save();
|
||||
if (g_pCodeWindow) Save();
|
||||
// Uninit
|
||||
m_Mgr->UnInit();
|
||||
|
|
|
@ -399,6 +399,16 @@ bool DolphinApp::OnInit()
|
|||
int w = SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth;
|
||||
int h = SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight;
|
||||
|
||||
// TODO: Do the same check for Linux
|
||||
#ifdef _WIN32
|
||||
// Out of desktop check
|
||||
HWND hDesktop = GetDesktopWindow();
|
||||
RECT rc;
|
||||
GetWindowRect(hDesktop, &rc);
|
||||
if (rc.right < x + w || rc.bottom < y + h)
|
||||
x = y = -1;
|
||||
#endif
|
||||
|
||||
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY, wxString::FromAscii(title),
|
||||
wxPoint(x, y), wxSize(w, h), UseDebugger, UseLogger);
|
||||
|
||||
|
|
Loading…
Reference in New Issue