mirror of https://github.com/snes9xgit/snes9x.git
vulkan/win32: Provide reasonable default swapchain.
If extents are reported 0xffffffff, swapchain expects a provided default size.
This commit is contained in:
parent
19787b12f1
commit
4f08da4cd8
|
@ -110,6 +110,11 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
|
||||||
swapchain_object.reset();
|
swapchain_object.reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if (extents.width > 8192 || extents.height > 8192)
|
||||||
|
{
|
||||||
|
extents.width = 512;
|
||||||
|
extents.height = 512;
|
||||||
|
}
|
||||||
|
|
||||||
auto swapchain_create_info = vk::SwapchainCreateInfoKHR{}
|
auto swapchain_create_info = vk::SwapchainCreateInfoKHR{}
|
||||||
.setMinImageCount(num_swapchain_images)
|
.setMinImageCount(num_swapchain_images)
|
||||||
|
|
|
@ -147,10 +147,7 @@ void COpenGL::DeInitialize()
|
||||||
wglDeleteContext(hRC);
|
wglDeleteContext(hRC);
|
||||||
hRC = NULL;
|
hRC = NULL;
|
||||||
}
|
}
|
||||||
if(hDC) {
|
hDC = NULL;
|
||||||
ReleaseDC(hWnd,hDC);
|
|
||||||
hDC = NULL;
|
|
||||||
}
|
|
||||||
hWnd = NULL;
|
hWnd = NULL;
|
||||||
afterRenderWidth = 0;
|
afterRenderWidth = 0;
|
||||||
afterRenderHeight = 0;
|
afterRenderHeight = 0;
|
||||||
|
|
Loading…
Reference in New Issue