GPUDevice: Fix race on resize in GL/Vulkan
This commit is contained in:
parent
573dfd2a26
commit
5d3cf93aa3
|
@ -576,6 +576,9 @@ bool OpenGLDevice::UpdateWindow()
|
|||
|
||||
void OpenGLDevice::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
{
|
||||
if (m_window_info.IsSurfaceless())
|
||||
return;
|
||||
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
if (m_window_info.surface_width == static_cast<u32>(new_window_width) &&
|
||||
m_window_info.surface_height == static_cast<u32>(new_window_height))
|
||||
|
|
|
@ -2213,6 +2213,9 @@ bool VulkanDevice::UpdateWindow()
|
|||
|
||||
void VulkanDevice::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
{
|
||||
if (!m_swap_chain)
|
||||
return;
|
||||
|
||||
if (m_swap_chain->GetWidth() == static_cast<u32>(new_window_width) &&
|
||||
m_swap_chain->GetHeight() == static_cast<u32>(new_window_height))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue