From ccc48d83a8103c2f7019b1827dbfdadfec8521ad Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Sat, 23 Jan 2021 16:48:45 -0500 Subject: [PATCH] Fix dx9 overlay graphics bug with black mesa. --- ImGui/impls/windows/imgui_impl_dx9.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ImGui/impls/windows/imgui_impl_dx9.cpp b/ImGui/impls/windows/imgui_impl_dx9.cpp index dcb38a9..69150e9 100644 --- a/ImGui/impls/windows/imgui_impl_dx9.cpp +++ b/ImGui/impls/windows/imgui_impl_dx9.cpp @@ -130,6 +130,7 @@ void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data) if (g_pd3dDevice->CreateStateBlock(D3DSBT_ALL, &d3d9_state_block) < 0) return; + d3d9_state_block->Capture(); // Backup the DX9 transform (DX9 documentation suggests that it is included in the StateBlock but it doesn't appear to) D3DMATRIX last_world, last_view, last_projection; g_pd3dDevice->GetTransform(D3DTS_WORLD, &last_world);