Skip to content
Snippets Groups Projects
Commit c267c327 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 4f7e825a
No related branches found
No related tags found
No related merge requests found
...@@ -281,12 +281,16 @@ gdi_handle_wm_paint(HWND hwnd) ...@@ -281,12 +281,16 @@ gdi_handle_wm_paint(HWND hwnd)
data = list->data; data = list->data;
} }
winDC = BeginPaint(hwnd, &ps); winDC = BeginPaint(hwnd, &ps);
if (memDC == NULL) if (memDC == NULL) {
memDC = CreateCompatibleDC(winDC); memDC = CreateCompatibleDC(winDC);
SetPixel(memDC, 0, 0, RGB(0, 0, 0));
}
if (di == NULL) if (di == NULL)
di = CreateDIBitmap(winDC, (BITMAPINFOHEADER *)&b5hdr, CBM_INIT, data, (BITMAPINFO *)&b5hdr, DIB_RGB_COLORS); di = CreateDIBitmap(winDC, (BITMAPINFOHEADER *)&b5hdr, CBM_INIT, data, (BITMAPINFO *)&b5hdr, DIB_RGB_COLORS);
else else
SetDIBits(winDC, di, 0, dih, data, (BITMAPINFO *)&b5hdr, DIB_RGB_COLORS); 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); di = SelectObject(memDC, di);
if (ciolib_scaling) { if (ciolib_scaling) {
BitBlt(winDC, 0, 0, w, h, memDC, 0, 0, SRCCOPY); 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.
Please register or to comment