Migrate the "Adjust window size" option to the main configuration dialog (under the "Display" tab, in "Emulator Display Settings", after "Window Size"). Also rework the way that the option works. When using render to main and the auto resize option, the application window will be resized and then resized back when the emulator stops. This looks much better than the box in the corner look before. Also only resize when it would actually change the size of the window. This fixes the hang on emulation stop on linux.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6910 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-01-25 03:30:12 +00:00
parent d3b8908a7c
commit 3ce1f73f73
18 changed files with 80 additions and 94 deletions

View file

@ -597,7 +597,10 @@ void CFrame::OnResize(wxSizeEvent& event)
event.Skip();
if (!IsMaximized() &&
!(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()))
!(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()) &&
!(Core::GetState() != Core::CORE_UNINITIALIZED &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth = GetSize().GetWidth();
SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight = GetSize().GetHeight();
@ -671,29 +674,25 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height)
{
wxMutexGuiEnter();
m_RenderParent->GetSize(&width, &height);
m_RenderParent->GetClientSize(&width, &height);
m_RenderParent->GetPosition(&x, &y);
wxMutexGuiLeave();
}
void CFrame::OnRenderWindowSizeRequest(int& width, int& height)
void CFrame::OnRenderWindowSizeRequest(int width, int height)
{
wxMutexGuiEnter();
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize ||
IsFullScreen() || m_RenderFrame->IsMaximized())
return;
if (IsFullScreen())
int old_width, old_height;
m_RenderFrame->GetClientSize(&old_width, &old_height);
if (old_width != width || old_height != height)
{
m_RenderParent->GetSize(&width, &height);
wxMutexGuiEnter();
m_RenderFrame->SetClientSize(width, height);
wxMutexGuiLeave();
}
else if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
{
m_RenderParent->SetClientSize(width, height);
}
else
{
m_RenderParent->GetParent()->SetClientSize(width, height);
}
wxMutexGuiLeave();
}
bool CFrame::RendererHasFocus()