From 0bdacb879511d274b159ffe98805c6eeb4e7e04e Mon Sep 17 00:00:00 2001 From: JeffR Date: Sun, 23 Jul 2023 14:42:13 -0500 Subject: [PATCH] Testing just disabling gfx device enumeration in test mode --- Engine/source/gfx/D3D11/gfxD3D11Device.cpp | 4 ++-- Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp index 63f6d21fc..7c83d098b 100644 --- a/Engine/source/gfx/D3D11/gfxD3D11Device.cpp +++ b/Engine/source/gfx/D3D11/gfxD3D11Device.cpp @@ -252,9 +252,9 @@ DXGI_SWAP_CHAIN_DESC GFXD3D11Device::setupPresentParams(const GFXVideoMode &mode void GFXD3D11Device::enumerateAdapters(Vector &adapterList) { - S32 monitorCount = PlatformWindowManager::get()->getMonitorCount(); - if (monitorCount < 1) +#ifdef TORQUE_TESTS_ENABLED return; +#endif IDXGIAdapter1* EnumAdapter; IDXGIFactory1* DXGIFactory; diff --git a/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp b/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp index db0f7dd1b..b886094c7 100644 --- a/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp +++ b/Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp @@ -77,9 +77,9 @@ void EnumerateVideoModes(Vector& outModes) void GFXGLDevice::enumerateAdapters( Vector &adapterList ) { - S32 monitorCount = PlatformWindowManager::get()->getMonitorCount(); - if (monitorCount < 1) +#ifdef TORQUE_TESTS_ENABLED return; +#endif AssertFatal( SDL_WasInit(SDL_INIT_VIDEO), "");