From 520b6254b3f93d4829e732a510a6ad6c998a7a1e Mon Sep 17 00:00:00 2001 From: superp00t Date: Fri, 6 Sep 2024 12:32:26 -0400 Subject: [PATCH] feat(gx): add more readable error for initializing an unknown device --- src/gx/Device.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gx/Device.cpp b/src/gx/Device.cpp index f22dd88..cbe7687 100644 --- a/src/gx/Device.cpp +++ b/src/gx/Device.cpp @@ -39,11 +39,14 @@ CGxDevice* GxDevCreate(EGxApi api, int32_t (*windowProc)(void* window, uint32_t #endif default: - // Error break; } - STORM_ASSERT(device != nullptr); + if (device == nullptr) { + STORM_PANIC("GxDevCreate: failed to create graphics device %d", api); + } + + // STORM_ASSERT(device != nullptr); g_theGxDevicePtr = device;