1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Match SetMaximumFrameLatency to the number of frames in flight

This commit is contained in:
Rémy Tassoux 2025-11-10 09:16:55 +01:00
parent 6f07596985
commit b4cfad50cb
2 changed files with 2 additions and 2 deletions

View file

@ -1158,7 +1158,7 @@ static void ImGui_ImplDX12_CreateWindow(ImGuiViewport* viewport)
vd->BackBuffer[i].RenderTarget = back_buffer;
}
hr = vd->SwapChain->SetMaximumFrameLatency(bd->numBackbuffer);
hr = vd->SwapChain->SetMaximumFrameLatency(bd->numFramesInFlight);
IM_ASSERT(hr == S_OK);
vd->SwapChainWaitableObject = vd->SwapChain->GetFrameLatencyWaitableObject();
}

View file

@ -450,7 +450,7 @@ bool CreateDeviceD3D(HWND hWnd)
swapChain1->Release();
dxgiFactory->Release();
g_pSwapChain->SetMaximumFrameLatency(APP_NUM_BACK_BUFFERS);
g_pSwapChain->SetMaximumFrameLatency(APP_NUM_FRAMES_IN_FLIGHT);
g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject();
}