- enable the depth buffer
- support vid_scalefactor
This commit is contained in:
parent
48d2d423f6
commit
d724b623d1
5 changed files with 65 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue