Skip to content
Snippets Groups Projects
Commit de4b8867 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Clear to black before drawing frame.

Will be needed once scaling works properly.
parent 3ac1ec71
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4161 passed
......@@ -281,12 +281,16 @@ gdi_handle_wm_paint(HWND hwnd)
data = list->data;
}
winDC = BeginPaint(hwnd, &ps);
if (memDC == NULL)
if (memDC == NULL) {
memDC = CreateCompatibleDC(winDC);
SetPixel(memDC, 0, 0, RGB(0, 0, 0));
}
if (di == NULL)
di = CreateDIBitmap(winDC, (BITMAPINFOHEADER *)&b5hdr, CBM_INIT, data, (BITMAPINFO *)&b5hdr, DIB_RGB_COLORS);
else
SetDIBits(winDC, di, 0, dih, data, (BITMAPINFO *)&b5hdr, DIB_RGB_COLORS);
// Clear to black first
StretchBlt(winDC, 0, 0, w, h, memDC, 0, 0, 1, 1, SRCCOPY);
di = SelectObject(memDC, di);
if (ciolib_scaling) {
BitBlt(winDC, 0, 0, w, h, memDC, 0, 0, SRCCOPY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment