- enable the depth buffer

- support vid_scalefactor
This commit is contained in:
Magnus Norddahl 2019-05-22 17:56:29 +02:00
commit d724b623d1
5 changed files with 65 additions and 4 deletions

View file

@ -17,7 +17,13 @@ void I_PresentPolyImage(int w, int h, const void *pixels)
info.bV5SizeImage = 0;
info.bV5CSType = LCS_WINDOWS_COLOR_SPACE;
RECT box = {};
GetClientRect(Window, &box);
HDC dc = GetDC(Window);
SetDIBitsToDevice(dc, 0, 0, w, h, 0, 0, 0, h, pixels, (const BITMAPINFO *)&info, DIB_RGB_COLORS);
if (box.right == w && box.bottom == h)
SetDIBitsToDevice(dc, 0, 0, w, h, 0, 0, 0, h, pixels, (const BITMAPINFO *)&info, DIB_RGB_COLORS);
else
StretchDIBits(dc, 0, 0, box.right, box.bottom, 0, 0, w, h, pixels, (const BITMAPINFO *)&info, DIB_RGB_COLORS, SRCCOPY);
ReleaseDC(Window, dc);
}