Vulkan/Wayland: Use old swapchain size if none provided.

This commit is contained in:
BearOso 2024-02-07 18:41:18 -06:00
parent f83a57fe25
commit 68af8fe783
1 changed files with 5 additions and 2 deletions

View File

@ -124,6 +124,9 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
else
num_swapchain_images = desired_num_swapchain_images;
// 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;