Minor fixes.

This commit is contained in:
Adam Sawicki 2018-08-07 17:58:46 +02:00
parent deeb817d7a
commit f188a152de

View File

@ -720,20 +720,19 @@ void Player::ExecuteCreatePool(size_t lineNumber, const CsvSplit& csvSplit)
{
Pool poolDesc = {};
VkResult res = vmaCreatePool(m_Allocator, &poolCreateInfo, &poolDesc.pool);
if(res == VK_SUCCESS)
if(res != VK_SUCCESS)
{
if(IssueWarning())
printf("Line %zu: vmaCreatePool failed (%u).\n", lineNumber, res);
}
const auto existingIt = m_Pools.find(origPtr);
if(existingIt != m_Pools.end())
{
if(IssueWarning())
printf("Line %zu: Pool %llX already exists.\n", lineNumber, origPtr);
}
}
else
{
if(IssueWarning())
printf("Line %zu: vmaCreatePool failed (%u).\n", lineNumber, res);
}
m_Pools[origPtr] = poolDesc;
}
else
@ -1034,7 +1033,7 @@ int main(int argc, char** argv)
{
try
{
main2(argc, argv);
return main2(argc, argv);
}
catch(const std::exception& e)
{
@ -1046,6 +1045,4 @@ int main(int argc, char** argv)
printf("UNKNOWN ERROR\n");
return RESULT_EXCEPTION;
}
return 0;
}