From 7ec1e679fd2676cde8e286812a0f5bec454f7d92 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 24 Nov 2024 14:48:45 +0100 Subject: [PATCH] Engine: properly adjust window size when buffers are resized The engine never updates CGame's window size members when the window size is adjusted. This patch now calls CGame::SetWindowSize() when the window is resized to make sure these members are always in sync. --- src/windows/id3dx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/windows/id3dx.cpp b/src/windows/id3dx.cpp index c5d574cd..77def155 100644 --- a/src/windows/id3dx.cpp +++ b/src/windows/id3dx.cpp @@ -138,6 +138,7 @@ HRESULT __stdcall ResizeBuffers(IDXGISwapChain* pSwapChain, UINT nBufferCount, U g_nWindowRect[1] = nHeight; /////////////////////////////////////////////////////////////////////////////// + g_pGame->SetWindowSize(nWidth, nHeight); return s_fnResizeBuffers(pSwapChain, nBufferCount, nWidth, nHeight, dxFormat, nSwapChainFlags); }