瀏覽代碼

Backends: Vulkan: Fix failing assertion for platforms where viewports are not supported (#8734)

Stanislav Vasilev 1 月之前
父節點
當前提交
3f0699cf02
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backends/imgui_impl_vulkan.cpp

+ 1 - 1
backends/imgui_impl_vulkan.cpp

@@ -2147,7 +2147,7 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*)
 void ImGui_ImplVulkan_InitMultiViewportSupport()
 {
     ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
-    if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
+    if (ImGui::GetIO().BackendFlags & ImGuiBackendFlags_PlatformHasViewports)
         IM_ASSERT(platform_io.Platform_CreateVkSurface != nullptr && "Platform needs to setup the CreateVkSurface handler.");
     platform_io.Renderer_CreateWindow = ImGui_ImplVulkan_CreateWindow;
     platform_io.Renderer_DestroyWindow = ImGui_ImplVulkan_DestroyWindow;