diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.cpp b/WickedEngine/wiGraphicsDevice_Vulkan.cpp index 0a8dab578..543d522aa 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.cpp +++ b/WickedEngine/wiGraphicsDevice_Vulkan.cpp @@ -22,9 +22,9 @@ namespace wiGraphicsTypes "VK_LAYER_LUNARG_standard_validation" }; #ifdef NDEBUG - const bool enableValidationLayers = false; + bool enableValidationLayers = false; #else - const bool enableValidationLayers = true; + bool enableValidationLayers = true; #endif bool checkValidationLayerSupport() { uint32_t layerCount; @@ -567,7 +567,9 @@ namespace wiGraphicsTypes } if (enableValidationLayers && !checkValidationLayerSupport()) { - throw std::runtime_error("validation layers requested, but not available!"); + //throw std::runtime_error("validation layers requested, but not available!"); + wiHelper::messageBox("Vulkan validation layer requested but not available!"); + enableValidationLayers = false; } // Create instance: diff --git a/WickedEngine/wiHelper.cpp b/WickedEngine/wiHelper.cpp index f7880b9ec..46a956fda 100644 --- a/WickedEngine/wiHelper.cpp +++ b/WickedEngine/wiHelper.cpp @@ -64,7 +64,7 @@ namespace wiHelper void messageBox(const std::string& msg, const std::string& caption){ #ifndef WINSTORE_SUPPORT - //MessageBoxA(wiWindowRegistration::GetInstance()->GetRegisteredWindow(), msg.c_str(), caption.c_str(), 0); + MessageBoxA(wiWindowRegistration::GetInstance()->GetRegisteredWindow(), msg.c_str(), caption.c_str(), 0); #else wstring wmsg(msg.begin(), msg.end()); wstring wcaption(caption.begin(), caption.end());