From ebbb295e85add5355f3f22bf6ce88f90b5c84432 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 19 May 2019 23:29:50 -0400 Subject: [PATCH] vulkan: Patched to compile on Visual Studio. --- src/video/SDL_vulkan_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/SDL_vulkan_utils.c b/src/video/SDL_vulkan_utils.c index 28a545377..a26606d02 100644 --- a/src/video/SDL_vulkan_utils.c +++ b/src/video/SDL_vulkan_utils.c @@ -192,7 +192,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, VULKAN_INSTANCE_FUNCTION(vkGetDisplayPlaneSupportedDisplaysKHR); VULKAN_INSTANCE_FUNCTION(vkCreateDisplayPlaneSurfaceKHR); #undef VULKAN_INSTANCE_FUNCTION - VkDisplaySurfaceCreateInfoKHR createInfo = {}; + VkDisplaySurfaceCreateInfoKHR createInfo; VkResult result; uint32_t physicalDeviceCount = 0; VkPhysicalDevice *physicalDevices = NULL; @@ -346,6 +346,8 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, SDL_free(displayModeProperties); goto error; } + + SDL_zero(createInfo); createInfo.displayMode = displayModeProperties[bestMatchIndex].displayMode; SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Matching mode %ux%u with refresh rate %u", displayModeProperties[bestMatchIndex].parameters.visibleRegion.width,