feat(console): add ConsoleDeviceExists

This commit is contained in:
Tristan Cormier 2025-11-04 09:32:33 -05:00 committed by fallenoak
parent 300d6b2f29
commit a64ab82e41
2 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@
#include "gx/Device.hpp"
#include <cstring>
static CGxDevice* s_device;
CVar* s_cvGxMaximize;
CVar* s_cvGxResolution;
CVar* s_cvGxWidescreen;
@ -198,7 +199,7 @@ void ConsoleDeviceInitialize(const char* title) {
api = GxApi_GLL;
#endif
CGxDevice* device = GxDevCreate(api, OsWindowProc, format);
s_device = GxDevCreate(api, OsWindowProc, format);
// TODO
@ -207,3 +208,7 @@ void ConsoleDeviceInitialize(const char* title) {
// TODO
}
int32_t ConsoleDeviceExists() {
return s_device != nullptr;
}

View File

@ -9,4 +9,6 @@ struct DefaultSettings {
void ConsoleDeviceInitialize(const char* title);
int32_t ConsoleDeviceExists();
#endif