mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-14 10:50:13 +01:00
Fix crash on some games using DX11.
The line: "ctx->PSGetSamplers(0, 1, &old.PSSampler);" will fail silently (no return code) but will not modify old.PSSampler making the game crash when accessing uninitialized memory.
This commit is contained in:
parent
fc76b2d53f
commit
145cbfdffd
1 changed files with 1 additions and 1 deletions
|
@ -194,7 +194,7 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
|
|||
DXGI_FORMAT IndexBufferFormat;
|
||||
ID3D11InputLayout* InputLayout;
|
||||
};
|
||||
BACKUP_DX11_STATE old;
|
||||
BACKUP_DX11_STATE old = {};
|
||||
old.ScissorRectsCount = old.ViewportsCount = D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE;
|
||||
ctx->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects);
|
||||
ctx->RSGetViewports(&old.ViewportsCount, old.Viewports);
|
||||
|
|
Loading…
Reference in a new issue