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

@ -271,6 +271,7 @@ EVT_MENU_RANGE(IDM_LISTWAD, IDM_LISTDRIVES, CFrame::GameListChanged)
EVT_ACTIVATE(CFrame::OnActive)
EVT_CLOSE(CFrame::OnClose)
EVT_SIZE(CFrame::OnResize)
EVT_MOVE(CFrame::OnMove)
EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, CFrame::OnGameListCtrl_ItemActivated)
EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
#if wxUSE_TIMER
@ -553,10 +554,20 @@ void CFrame::PostUpdateUIEvent(wxUpdateUIEvent& event)
if (g_pCodeWindow) g_pCodeWindow->AddPendingEvent(event);
}
void CFrame::OnMove(wxMoveEvent& event)
{
event.Skip();
SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX = GetPosition().x;
SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY = GetPosition().y;
}
void CFrame::OnResize(wxSizeEvent& event)
{
event.Skip();
SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth = GetSize().GetWidth();
SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight = GetSize().GetHeight();
DoMoveIcons(); // In FrameWiimote.cpp
}
void CFrame::OnResizeAll(wxSizeEvent& event)