From 80d31eafef3dea3ee45526d9798668795665d87e Mon Sep 17 00:00:00 2001 From: Mars Date: Sat, 28 Sep 2024 19:38:13 -0400 Subject: [PATCH] weh --- src/main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 17e2850..3887491 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,7 +9,8 @@ #include #include -#include "src/util/types.h" +#include "util/magic_enum.hpp" +#include "util/types.h" const uint32_t WIDTH = 800; const uint32_t HEIGHT = 600; @@ -183,8 +184,11 @@ class Application { } fn createSurface() -> void { - if (glfwCreateWindowSurface(mInstance, mWindow, nullptr, &mSurface) != VK_SUCCESS) - throw std::runtime_error("failed to create window surface!"); + if (VkResult result = glfwCreateWindowSurface(mInstance, mWindow, nullptr, &mSurface); + result != VK_SUCCESS) + throw std::runtime_error( + "Failed to create window surface! Error: " + string(magic_enum::enum_name(result)) + ); } fn pickPhysicalDevice() -> void {