restore old codes.

This commit is contained in:
hyzboy 2021-09-23 15:23:09 +08:00
parent 45f5d0d5be
commit b9df5bdf8c

View File

@ -87,7 +87,10 @@ void GPUDeviceAttribute::Refresh()
{
VkSurfaceFormatKHR *sf = surface_formats_list.GetData();
if (format_count>1)
if (format_count == 1 && sf->format == VK_FORMAT_UNDEFINED)
{
}
else
{
surface_format.format=VK_FORMAT_UNDEFINED;