feat(gx): add more readable error for initializing an unknown device

This commit is contained in:
superp00t 2024-09-06 12:32:26 -04:00
parent c6e1751bbe
commit 520b6254b3

View File

@ -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;