Skip to content

Commit

Permalink
Move BMI dimensions initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaivel committed Jul 5, 2024
1 parent 9b87b23 commit 3d91bd3
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 @@ -268,13 +268,13 @@ BOOL APIENTRY DrvSwapBuffers(HDC hdc)
static void *Frame = NULL;

if (!Init) {
bmi.bmiHeader.biWidth = maxWidth;
bmi.bmiHeader.biHeight = -maxHeight;

Frame = glimpl_fb_address();
Init = 1;
}

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(hdc, 0, 0, realWidth, realHeight, 0, 0, 0, realHeight, Frame, &bmi, DIB_RGB_COLORS);
// StretchDIBits(hdc, 0, 0, realWidth, realHeight, 0, 0, realWidth, realHeight, Frame, &bmi, DIB_RGB_COLORS, SRCCOPY);
Expand Down

0 comments on commit 3d91bd3

Please sign in to comment.