From dd2e18ba56a80646e9d289733385b521a5077de2 Mon Sep 17 00:00:00 2001 From: dmaivel Date: Thu, 4 Jul 2024 21:52:16 -0400 Subject: [PATCH] Fix window resizing on Windows --- src/client/platform/windrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/platform/windrv.c b/src/client/platform/windrv.c index 603fd6e..0fc1a3e 100644 --- a/src/client/platform/windrv.c +++ b/src/client/platform/windrv.c @@ -286,12 +286,12 @@ BOOL APIENTRY DrvSwapBuffers(HDC hdc) Init = 1; } - bmi.bmiHeader.biWidth = realWidth; - bmi.bmiHeader.biHeight = -realHeight; + bmi.bmiHeader.biWidth = maxWidth; + bmi.bmiHeader.biHeight = -maxHeight; glimpl_swap_buffers(realWidth, realHeight, 1, GL_BGRA); /* to-do: fix overlay so vflip and -Height won't be needed */ SetDIBitsToDevice(capturedHdc, 0, 0, realWidth, realHeight, 0, 0, 0, realHeight, Frame, &bmi, DIB_RGB_COLORS); - // StretchDIBits(Hdc, 0, 0, Width, Height, 0, 0, Width, Height, Frame, &bmi, DIB_RGB_COLORS, SRCCOPY); + // StretchDIBits(capturedHdc, 0, 0, realWidth, realHeight, 0, 0, realWidth, realHeight, Frame, &bmi, DIB_RGB_COLORS, SRCCOPY); return TRUE; }