From 0ba23f9b1390ee8aeb15ec1fb258fe841a1fec64 Mon Sep 17 00:00:00 2001 From: Tao <34903089+sleepinging@users.noreply.github.com> Date: Wed, 5 Jun 2024 22:33:49 +0800 Subject: [PATCH] Fix adapter object leak when there are more than 4 graphics cards (#3306) when my computer have more than 4 gpu, it's debug break on --- src/dxgi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxgi.cpp b/src/dxgi.cpp index e3e6e6ae7..4eae796d3 100644 --- a/src/dxgi.cpp +++ b/src/dxgi.cpp @@ -278,7 +278,7 @@ namespace bgfx { AdapterI* adapter; for (uint32_t ii = 0 - ; DXGI_ERROR_NOT_FOUND != m_factory->EnumAdapters(ii, reinterpret_cast(&adapter) ) && ii < BX_COUNTOF(_caps.gpu) + ; ii < BX_COUNTOF(_caps.gpu) && DXGI_ERROR_NOT_FOUND != m_factory->EnumAdapters(ii, reinterpret_cast(&adapter) ) ; ++ii ) {