Skip to content

Commit

Permalink
Fix window resizing on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaivel committed Jul 5, 2024
1 parent a42003d commit dd2e18b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/platform/windrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dd2e18b

Please sign in to comment.