mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Add anvideo config option to automatically resize the render window to the size of the game's output resolution. This avoids artifacts that appear when the render target is scaled to fit a window of a different size.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6764 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -669,7 +669,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
void CFrame::OnSizeRequest(int& x, int& y, int& width, int& height)
|
||||
void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||
{
|
||||
wxMutexGuiEnter();
|
||||
m_RenderParent->GetSize(&width, &height);
|
||||
@ -677,6 +677,26 @@ void CFrame::OnSizeRequest(int& x, int& y, int& width, int& height)
|
||||
wxMutexGuiLeave();
|
||||
}
|
||||
|
||||
void CFrame::OnRenderWindowSizeRequest(int& width, int& height)
|
||||
{
|
||||
wxMutexGuiEnter();
|
||||
|
||||
if (IsFullScreen())
|
||||
{
|
||||
m_RenderParent->GetSize(&width, &height);
|
||||
}
|
||||
else if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
{
|
||||
m_RenderParent->SetClientSize(width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RenderParent->GetParent()->SetClientSize(width, height);
|
||||
}
|
||||
|
||||
wxMutexGuiLeave();
|
||||
}
|
||||
|
||||
bool CFrame::RendererHasFocus()
|
||||
{
|
||||
if (m_RenderParent == NULL)
|
||||
|
@ -123,7 +123,8 @@ class CFrame : public CRenderFrame
|
||||
void PostEvent(wxCommandEvent& event);
|
||||
void StatusBarMessage(const char * Text, ...);
|
||||
void ClearStatusBar();
|
||||
void OnSizeRequest(int& x, int& y, int& width, int& height);
|
||||
void GetRenderWindowSize(int& x, int& y, int& width, int& height);
|
||||
void OnRenderWindowSizeRequest(int& width, int& height);
|
||||
void BootGame(const std::string& filename);
|
||||
void OnRenderParentClose(wxCloseEvent& event);
|
||||
void OnRenderParentMove(wxMoveEvent& event);
|
||||
|
@ -602,9 +602,14 @@ void Host_UpdateMemoryView()
|
||||
void Host_SetDebugMode(bool)
|
||||
{}
|
||||
|
||||
void Host_RequestWindowSize(int& x, int& y, int& width, int& height)
|
||||
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||
{
|
||||
main_frame->OnSizeRequest(x, y, width, height);
|
||||
main_frame->GetRenderWindowSize(x, y, width, height);
|
||||
}
|
||||
|
||||
void Host_RequestRenderWindowSize(int& width, int& height)
|
||||
{
|
||||
main_frame->OnRenderWindowSizeRequest(width, height);
|
||||
}
|
||||
|
||||
void Host_SetWaitCursor(bool enable)
|
||||
|
@ -93,7 +93,7 @@ void Host_UpdateMemoryView(){}
|
||||
|
||||
void Host_SetDebugMode(bool){}
|
||||
|
||||
void Host_RequestWindowSize(int& x, int& y, int& width, int& height)
|
||||
void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
|
||||
{
|
||||
x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos;
|
||||
y = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos;
|
||||
|
Reference in New Issue
Block a user