Skip to content

Commit

Permalink
Fix "The Vulkan spec states" not getting muted
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jan 23, 2025
1 parent 9faeec2 commit 4362a85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/ZVulkan/src/vulkaninstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,13 @@ VkBool32 VulkanInstance::DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT me
if (parts.size() == 3)
{
msg = parts[2];
size_t pos = msg.find(" The Vulkan spec states:");
size_t pos = msg.find("The Vulkan spec states:");
if (pos != std::string::npos)
msg = msg.substr(0, pos);

while (!msg.empty() && (msg.back() == '\n' || msg.back() == '\r' || msg.back() == ' '))
msg.pop_back();

if (callbackData->objectCount > 0)
{
msg += " (";
Expand Down

0 comments on commit 4362a85

Please sign in to comment.