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
This commit is contained in:
Tao 2024-06-05 22:33:49 +08:00 committed by GitHub
parent 530a558b11
commit 0ba23f9b13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ namespace bgfx
{
AdapterI* adapter;
for (uint32_t ii = 0
; DXGI_ERROR_NOT_FOUND != m_factory->EnumAdapters(ii, reinterpret_cast<IDXGIAdapter**>(&adapter) ) && ii < BX_COUNTOF(_caps.gpu)
; ii < BX_COUNTOF(_caps.gpu) && DXGI_ERROR_NOT_FOUND != m_factory->EnumAdapters(ii, reinterpret_cast<IDXGIAdapter**>(&adapter) )
; ++ii
)
{