mirror of https://github.com/snes9xgit/snes9x.git
Vulkan/Wayland: Use old swapchain size if none provided.
This commit is contained in:
parent
f83a57fe25
commit
68af8fe783
|
@ -124,7 +124,10 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
|
|||
else
|
||||
num_swapchain_images = desired_num_swapchain_images;
|
||||
|
||||
extents = surface_capabilities.currentExtent;
|
||||
// If extents aren't reported (Wayland), we have to rely on Wayland to report
|
||||
// the size, so keep current extent.
|
||||
if (surface_capabilities.currentExtent.width != -1)
|
||||
extents = surface_capabilities.currentExtent;
|
||||
|
||||
uint32_t graphics_queue_index = 0;
|
||||
auto queue_properties = physical_device.getQueueFamilyProperties();
|
||||
|
@ -396,4 +399,4 @@ vk::RenderPass &Swapchain::get_render_pass()
|
|||
return render_pass.get();
|
||||
}
|
||||
|
||||
} // namespace Vulkan
|
||||
} // namespace Vulkan
|
||||
|
|
Loading…
Reference in New Issue