GL/Context: Fix surfaceless context creation

This commit is contained in:
Stenzek 2023-11-21 17:04:45 +10:00
parent bbeae07478
commit a80ffc9c7d
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View File

@ -133,6 +133,8 @@ std::unique_ptr<GL::Context> Context::Create(const WindowInfo& wi, const Version
if (wi.type == WindowInfo::Type::Wayland)
context = ContextEGLWayland::Create(wi, versions_to_try, num_versions_to_try);
#endif
if (wi.type == WindowInfo::Type::Surfaceless)
context = ContextEGL::Create(wi, versions_to_try, num_versions_to_try);
#endif
if (!context)

View File

@ -351,9 +351,11 @@ bool VulkanSwapChain::CreateSwapChain()
image_count = std::min(image_count, surface_capabilities.maxImageCount);
// Determine the dimensions of the swap chain. Values of -1 indicate the size we specify here
// determines window size?
// determines window size? Android sometimes lags updating currentExtent, so don't use it.
VkExtent2D size = surface_capabilities.currentExtent;
#ifndef __ANDROID__
if (size.width == UINT32_MAX)
#endif
{
size.width = m_window_info.surface_width;
size.height = m_window_info.surface_height;