Ensure MessageBox call only emitted for Windows

This commit is contained in:
Jack Andersen 2016-07-17 11:18:28 -10:00
parent 3076c0525d
commit 6473014178
1 changed files with 5 additions and 0 deletions

View File

@ -312,10 +312,15 @@ void VulkanContext::initVulkan(const char* appName)
VkResult instRes = vk::CreateInstance(&instInfo, nullptr, &m_instance);
if (instRes != VK_SUCCESS)
{
#ifdef _WIN32
MessageBoxW(nullptr, L"Error creating Vulkan instance\n\n"
L"The Vulkan runtime is installed, but there are no supported "
L"hardware vendor interfaces present",
L"Vulkan Error", MB_OK | MB_ICONERROR);
#else
Log.report(logvisor::Fatal, "The Vulkan runtime is installed, but there are no supported "
"hardware vendor interfaces present");
#endif
exit(1);
}