mirror of
https://github.com/ocornut/imgui.git
synced 2025-04-05 21:45:10 +00: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
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue