Fix dx9 overlay graphics bug with black mesa.

This commit is contained in:
Mr_Goldberg 2021-01-23 16:48:45 -05:00
parent 58b09d4f11
commit ccc48d83a8
No known key found for this signature in database
GPG key ID: 8597D87419DEF278

View file

@ -130,6 +130,7 @@ void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data)
if (g_pd3dDevice->CreateStateBlock(D3DSBT_ALL, &d3d9_state_block) < 0) if (g_pd3dDevice->CreateStateBlock(D3DSBT_ALL, &d3d9_state_block) < 0)
return; 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) // 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; D3DMATRIX last_world, last_view, last_projection;
g_pd3dDevice->GetTransform(D3DTS_WORLD, &last_world); g_pd3dDevice->GetTransform(D3DTS_WORLD, &last_world);