mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user