Vulkan: Add better handling for errors

This commit is contained in:
Lynix 2017-08-06 12:14:11 +02:00
parent cc0c661dd7
commit 4a156ab3d7
2 changed files with 7 additions and 1 deletions

View File

@ -83,6 +83,12 @@ namespace Nz
} }
} }
if (!chosenImpl)
{
NazaraError("No renderer found");
return false;
}
s_rendererImpl = std::move(chosenImpl); s_rendererImpl = std::move(chosenImpl);
s_rendererLib = std::move(chosenLib); s_rendererLib = std::move(chosenLib);

View File

@ -174,7 +174,7 @@ namespace Nz
if (!s_instance.Create(instanceInfo)) if (!s_instance.Create(instanceInfo))
{ {
NazaraError("Failed to create instance"); NazaraError("Failed to create instance: " + TranslateVulkanError(s_instance.GetLastErrorCode()));
return false; return false;
} }