mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-20 04:21:01 +01:00
Backends: Vulkan: Fixed building with older headers not supporting VK_HEADER_VERSION_COMPLETE. (#8326, #8365)
This commit is contained in:
parent
12963f5231
commit
e1ae7db4cc
@ -1159,7 +1159,14 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info)
|
||||
|
||||
bd->VulkanInitInfo = *info;
|
||||
if (bd->VulkanInitInfo.ApiVersion == 0)
|
||||
{
|
||||
// We don't care about other versions for now, so don't need to make this exhaustive (with #ifdef VK_VERSION_1_X checks)
|
||||
#ifdef VK_HEADER_VERSION_COMPLETE
|
||||
bd->VulkanInitInfo.ApiVersion = VK_HEADER_VERSION_COMPLETE;
|
||||
#else
|
||||
bd->VulkanInitInfo.ApiVersion = VK_API_VERSION_1_0;
|
||||
#endif
|
||||
}
|
||||
|
||||
ImGui_ImplVulkan_CreateDeviceObjects();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user