VideoCommon: Call Renderer::SurfaceChanged on render parent resize

This is needed because for some reason the WSI for NV Vulkan drivers
doesn't return VK_ERROR_OUT_OF_DATE_KHR, so there is no other way to know
that a resize has occured apart from polling, which is a poor solution for
X11 (since it is blocking).
This commit is contained in:
Stenzek
2016-08-13 22:08:53 +10:00
parent 5346078791
commit 6a99cbd9fc
6 changed files with 44 additions and 29 deletions

View File

@ -77,6 +77,7 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"
@ -907,6 +908,12 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
}
m_LogWindow->Refresh();
m_LogWindow->Update();
// We call Renderer::ChangeSurface here to indicate the size has changed,
// but pass the same window handle. This is needed for the Vulkan backend,
// otherwise it cannot tell that the window has been resized on some drivers.
if (g_renderer)
g_renderer->ChangeSurface(GetRenderHandle());
}
event.Skip();
}