fix(gx): only use GLSDL if compiled with CMake variable WHOA_BUILD_GLSDL

This commit is contained in:
phaneron 2024-07-22 00:43:39 -04:00
parent 35cc734cdc
commit 5229b9b972
3 changed files with 5 additions and 2 deletions

View file

@ -50,6 +50,9 @@ else()
# Right now GLSDL is the only rendering device for Linux # Right now GLSDL is the only rendering device for Linux
set(WHOA_BUILD_GLSDL 1) set(WHOA_BUILD_GLSDL 1)
endif() endif()
if (WHOA_BUILD_GLSDL)
add_definitions(-DWHOA_BUILD_GLSDL)
endif()
# FMOD # FMOD
option(WHOA_BUILD_FMOD "Disable/Enable the use of the FMOD sound API. This introduces a dependency on a proprietary FMOD dynamically linked library." 0) option(WHOA_BUILD_FMOD "Disable/Enable the use of the FMOD sound API. This introduces a dependency on a proprietary FMOD dynamically linked library." 0)

View file

@ -127,7 +127,7 @@ CGxDevice* CGxDevice::NewOpenGl() {
return nullptr; return nullptr;
} }
#if defined(WHOA_SYSTEM_WIN) || defined(WHOA_SYSTEM_LINUX) #if defined(WHOA_BUILD_GLSDL)
CGxDevice* CGxDevice::NewGLSDL() { CGxDevice* CGxDevice::NewGLSDL() {
auto m = SMemAlloc(sizeof(CGxDeviceGLSDL), __FILE__, __LINE__, 0x0); auto m = SMemAlloc(sizeof(CGxDeviceGLSDL), __FILE__, __LINE__, 0x0);
return new (m) CGxDeviceGLSDL(); return new (m) CGxDeviceGLSDL();

View file

@ -57,7 +57,7 @@ class CGxDevice {
#if defined(WHOA_SYSTEM_MAC) #if defined(WHOA_SYSTEM_MAC)
static CGxDevice* NewGLL(); static CGxDevice* NewGLL();
#endif #endif
#if defined(WHOA_SYSTEM_LINUX) || defined(WHOA_SYSTEM_WIN) #if defined(WHOA_BUILD_GLSDL)
static CGxDevice* NewGLSDL(); static CGxDevice* NewGLSDL();
#endif #endif
static CGxDevice* NewOpenGl(); static CGxDevice* NewOpenGl();