From 3da33bdcbe42942d19e9ddfdaee42c2bf90f77f7 Mon Sep 17 00:00:00 2001 From: Spodi Date: Tue, 24 Oct 2023 03:10:32 +0200 Subject: [PATCH] Fix cropping on dpi >100% (#358) Was triggered by my keyboard resize fix. --- src/graphic/Fast3D/gfx_direct3d11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphic/Fast3D/gfx_direct3d11.cpp b/src/graphic/Fast3D/gfx_direct3d11.cpp index 3bcc78c84..9593b107b 100644 --- a/src/graphic/Fast3D/gfx_direct3d11.cpp +++ b/src/graphic/Fast3D/gfx_direct3d11.cpp @@ -891,7 +891,7 @@ static void gfx_d3d11_update_framebuffer_parameters(int fb_id, uint32_t width, u if (desc1.Width != width || desc1.Height != height) { fb.render_target_view.Reset(); tex.texture.Reset(); - ThrowIfFailed(swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, desc1.Flags)); + ThrowIfFailed(swap_chain->ResizeBuffers(0, width, height, DXGI_FORMAT_UNKNOWN, desc1.Flags)); } ThrowIfFailed( swap_chain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)tex.texture.ReleaseAndGetAddressOf()));