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.
This commit is contained in:
Kawe Mazidjatari 2024-11-24 14:48:45 +01:00
parent 7ee1626233
commit 7ec1e679fd

View File

@ -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);
}