diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 65ba59f3c0..afab7f8a54 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -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(); diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 5f3bb9cead..b39a6f1411 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -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);