From 3e59b7345c8ebef6ded0a217a41f61c785bff3e7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 14 Sep 2016 15:18:07 +0200 Subject: [PATCH] Fix early-out in Vulkan extension check Related to #858. --- src/vulkan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vulkan.c b/src/vulkan.c index 49ca4446..6e384129 100644 --- a/src/vulkan.c +++ b/src/vulkan.c @@ -108,15 +108,15 @@ GLFWbool _glfwInitVulkan(void) { if (strcmp(ep[i].extensionName, "VK_KHR_surface") == 0) _glfw.vk.KHR_surface = GLFW_TRUE; - if (strcmp(ep[i].extensionName, "VK_KHR_win32_surface") == 0) + else if (strcmp(ep[i].extensionName, "VK_KHR_win32_surface") == 0) _glfw.vk.KHR_win32_surface = GLFW_TRUE; - if (strcmp(ep[i].extensionName, "VK_KHR_xlib_surface") == 0) + else if (strcmp(ep[i].extensionName, "VK_KHR_xlib_surface") == 0) _glfw.vk.KHR_xlib_surface = GLFW_TRUE; - if (strcmp(ep[i].extensionName, "VK_KHR_xcb_surface") == 0) + else if (strcmp(ep[i].extensionName, "VK_KHR_xcb_surface") == 0) _glfw.vk.KHR_xcb_surface = GLFW_TRUE; - if (strcmp(ep[i].extensionName, "VK_KHR_wayland_surface") == 0) + else if (strcmp(ep[i].extensionName, "VK_KHR_wayland_surface") == 0) _glfw.vk.KHR_wayland_surface = GLFW_TRUE; - if (strcmp(ep[i].extensionName, "VK_KHR_mir_surface") == 0) + else if (strcmp(ep[i].extensionName, "VK_KHR_mir_surface") == 0) _glfw.vk.KHR_mir_surface = GLFW_TRUE; }