mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-03-03 22:10:54 +00:00
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)
|
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;
|
m_window_info.surface_scale = new_window_scale;
|
||||||
if (m_window_info.surface_width == static_cast<u32>(new_window_width) &&
|
if (m_window_info.surface_width == static_cast<u32>(new_window_width) &&
|
||||||
m_window_info.surface_height == static_cast<u32>(new_window_height))
|
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)
|
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) &&
|
if (m_swap_chain->GetWidth() == static_cast<u32>(new_window_width) &&
|
||||||
m_swap_chain->GetHeight() == static_cast<u32>(new_window_height))
|
m_swap_chain->GetHeight() == static_cast<u32>(new_window_height))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue