GPUDevice: Fix race on resize in GL/Vulkan

This commit is contained in:
Stenzek 2024-01-10 14:14:17 +10:00
parent 573dfd2a26
commit 5d3cf93aa3
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -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))

View File

@ -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))
{