1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

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

This commit is contained in:
Stanislav Vasilev 2025-06-26 21:31:46 +03:00 committed by GitHub
parent adfa5364cd
commit 3f0699cf02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2147,7 +2147,7 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*)
void ImGui_ImplVulkan_InitMultiViewportSupport() void ImGui_ImplVulkan_InitMultiViewportSupport()
{ {
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); 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."); IM_ASSERT(platform_io.Platform_CreateVkSurface != nullptr && "Platform needs to setup the CreateVkSurface handler.");
platform_io.Renderer_CreateWindow = ImGui_ImplVulkan_CreateWindow; platform_io.Renderer_CreateWindow = ImGui_ImplVulkan_CreateWindow;
platform_io.Renderer_DestroyWindow = ImGui_ImplVulkan_DestroyWindow; platform_io.Renderer_DestroyWindow = ImGui_ImplVulkan_DestroyWindow;