Fix uninitialized values and release COM resources after use

This commit is contained in:
GoaLitiuM
2022-03-17 21:06:33 +02:00
committed by Ari Vuollet
parent e794911755
commit 33fe5e7518
3 changed files with 4 additions and 0 deletions

View File

@@ -275,6 +275,7 @@ bool GPUDeviceDX11::Init()
{
AllowTearing = true;
}
factory5->Release();
}
}

View File

@@ -274,6 +274,7 @@ bool GPUDeviceDX12::Init()
{
AllowTearing = true;
}
factory5->Release();
}
}

View File

@@ -51,6 +51,8 @@ GPUSwapChainDX12::GPUSwapChainDX12(GPUDeviceDX12* device, Window* window)
, _windowHandle(static_cast<HWND>(window->GetNativePtr()))
, _swapChain(nullptr)
, _currentFrameIndex(0)
, _allowTearing(false)
, _isFullscreen(false)
{
ASSERT(_windowHandle);
_window = window;