Replaced GlobalAlloc with malloc.

WaveMix keeps GlobalAlloc for authenticity.
Fixed float to double casts.
Some cleanup.
This commit is contained in:
Muzychenko Andrey
2021-02-18 12:53:25 +03:00
parent 55984fbb08
commit 98f234fce3
33 changed files with 171 additions and 174 deletions

View File

@@ -323,17 +323,17 @@ void fullscrn::fillRect(int right, int bottom, int left, int top)
if (brush)
{
auto dc = winmain::_GetDC(hWnd);
auto prevBrush = SelectObject(dc, brush);
if (dc)
{
auto prevBrush = SelectObject(dc, brush);
rc.right = left + right + 1;
rc.bottom = top + bottom + 1;
rc.left = left;
rc.top = top;
FillRect(dc, &rc, brush);
SelectObject(dc, prevBrush);
ReleaseDC(hWnd, dc);
}
SelectObject(dc, prevBrush);
DeleteObject(brush);
}
}