1 parent bdaf92b commit 58927fbCopy full SHA for 58927fb
1 file changed
OptiScaler/menu/menu_overlay_dx.cpp
@@ -430,11 +430,14 @@ static void RenderImGui_DX12(IDXGISwapChain* pSwapChainPlain)
430
return;
431
}
432
433
+ DXGI_SWAP_CHAIN_DESC scDesc;
434
+ pSwapChain->GetDesc(&scDesc);
435
+
436
ImGui_ImplDX12_InitInfo initInfo {};
437
initInfo.Device = device;
438
initInfo.CommandQueue = (ID3D12CommandQueue*) currentSCCommandQueue;
439
initInfo.NumFramesInFlight = NUM_BACK_BUFFERS;
- initInfo.RTVFormat = DXGI_FORMAT_R8G8B8A8_UNORM;
440
+ initInfo.RTVFormat = scDesc.BufferDesc.Format;
441
initInfo.DSVFormat = DXGI_FORMAT_UNKNOWN;
442
initInfo.SrvDescriptorHeap = g_pd3dSrvDescHeap;
443
initInfo.SrvDescriptorAllocFn = [](ImGui_ImplDX12_InitInfo*, D3D12_CPU_DESCRIPTOR_HANDLE* out_cpu_handle,
0 commit comments