Skip to content

Commit 58927fb

Browse files
FakeMichauTheRazerMD
authored andcommitted
Fix overlay visual glitching
1 parent bdaf92b commit 58927fb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎OptiScaler/menu/menu_overlay_dx.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,14 @@ static void RenderImGui_DX12(IDXGISwapChain* pSwapChainPlain)
430430
return;
431431
}
432432

433+
DXGI_SWAP_CHAIN_DESC scDesc;
434+
pSwapChain->GetDesc(&scDesc);
435+
433436
ImGui_ImplDX12_InitInfo initInfo {};
434437
initInfo.Device = device;
435438
initInfo.CommandQueue = (ID3D12CommandQueue*) currentSCCommandQueue;
436439
initInfo.NumFramesInFlight = NUM_BACK_BUFFERS;
437-
initInfo.RTVFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
440+
initInfo.RTVFormat = scDesc.BufferDesc.Format;
438441
initInfo.DSVFormat = DXGI_FORMAT_UNKNOWN;
439442
initInfo.SrvDescriptorHeap = g_pd3dSrvDescHeap;
440443
initInfo.SrvDescriptorAllocFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_handle,

0 commit comments

Comments
 (0)