Skip to content

Commit

Permalink
Fix adapter object leak when there are more than 4 graphics cards (#3306
Browse files Browse the repository at this point in the history
)

when my computer have more than 4 gpu, it's debug break on
  • Loading branch information
sleepinging authored Jun 5, 2024
1 parent 530a558 commit 0ba23f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dxgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
{
Expand Down

0 comments on commit 0ba23f9

Please sign in to comment.