From 6a99cbd9fc32637b18b1b030ec06ce9c73be04eb Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 13 Aug 2016 22:08:53 +1000 Subject: 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). --- Source/Core/DolphinWX/FrameTools.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Source/Core/DolphinWX/FrameTools.cpp') diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 55e31075d6..2b690c0e5a 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -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(); } -- cgit v1.2.3