From eeb563d2c229483da42487f455f6f56ab449b054 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Tue, 21 Jan 2025 21:24:58 +0100 Subject: [PATCH] fixing msvc compilation issue --- third_party/kvf.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/third_party/kvf.h b/third_party/kvf.h index 5e79dba..73d7042 100755 --- a/third_party/kvf.h +++ b/third_party/kvf.h @@ -1921,9 +1921,13 @@ void kvfDestroySemaphore(VkDevice device, VkSemaphore semaphore) if(support->formats_count == 1 && support->formats[0].format == VK_FORMAT_UNDEFINED) { // If the list contains one undefined format, it means any format can be used + VkSurfaceFormatKHR format; + format.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; if(srgb) - return (VkSurfaceFormatKHR){ .format = VK_FORMAT_R8G8B8A8_SRGB, .colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; - return (VkSurfaceFormatKHR){ .format = VK_FORMAT_R8G8B8A8_UNORM, .colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; + format.format = VK_FORMAT_R8G8B8A8_SRGB; + else + format.format = VK_FORMAT_R8G8B8A8_UNORM; + return format } for(uint32_t i = 0; i < support->formats_count; i++)