GL/Context: Fix surfaceless context creation
This commit is contained in:
parent
bbeae07478
commit
a80ffc9c7d
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue