From 300d6b2f29f59f474d2c1e6871eeb7579efb6e0c Mon Sep 17 00:00:00 2001 From: Tristan Cormier Date: Tue, 4 Nov 2025 09:28:32 -0500 Subject: [PATCH] feat(gx): add GxDevExists --- src/gx/Device.cpp | 4 ++++ src/gx/Device.hpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/gx/Device.cpp b/src/gx/Device.cpp index 7daa8ac..d30db2c 100644 --- a/src/gx/Device.cpp +++ b/src/gx/Device.cpp @@ -42,6 +42,10 @@ CGxDevice* GxDevCreate(EGxApi api, int32_t (*windowProc)(void* window, uint32_t } } +int32_t GxDevExists() { + return g_theGxDevicePtr != nullptr; +} + EGxApi GxDevApi() { return g_theGxDevicePtr->m_api; } diff --git a/src/gx/Device.hpp b/src/gx/Device.hpp index 7ead52b..1190109 100644 --- a/src/gx/Device.hpp +++ b/src/gx/Device.hpp @@ -11,6 +11,8 @@ extern CGxDevice* g_theGxDevicePtr; CGxDevice* GxDevCreate(EGxApi api, int32_t (*windowProc)(void* window, uint32_t message, uintptr_t wparam, intptr_t lparam), const CGxFormat& format); +int32_t GxDevExists(); + EGxApi GxDevApi(void); void* GxDevWindow();