mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-04 15:23:32 +08:00
Fixed tests and not intialized values.
This commit is contained in:
parent
0c57065c73
commit
dbab3dd7e3
@ -342,7 +342,7 @@ static BOOL BitBlt_process(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
||||
UINT32 nXSrc, UINT32 nYSrc, const char* rop, const gdiPalette* palette)
|
||||
{
|
||||
INT64 x, y;
|
||||
UINT32 style;
|
||||
UINT32 style = 0;
|
||||
BOOL useSrc = FALSE;
|
||||
BOOL usePat = FALSE;
|
||||
const char* iter = rop;
|
||||
|
@ -494,6 +494,7 @@ static BOOL test_gdi_BitBlt(UINT32 SrcFormat, UINT32 DstFormat)
|
||||
HGDI_BITMAP hBmpSrc;
|
||||
HGDI_BITMAP hBmpDst;
|
||||
HGDI_BITMAP hBmpDstOriginal;
|
||||
HGDI_BRUSH brush;
|
||||
gdiPalette g;
|
||||
gdiPalette* hPalette = &g;
|
||||
g.format = DstFormat;
|
||||
@ -543,6 +544,9 @@ static BOOL test_gdi_BitBlt(UINT32 SrcFormat, UINT32 DstFormat)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
brush = gdi_CreateSolidBrush(0x123456);
|
||||
gdi_SelectObject(hdcDst, (HGDIOBJECT)brush);
|
||||
|
||||
for (x = 0; x < number_tests; x++)
|
||||
{
|
||||
if (!test_rop(hdcDst, hdcSrc, hBmpSrc, hBmpDst, hBmpDstOriginal, tests[x].rop,
|
||||
@ -550,6 +554,8 @@ static BOOL test_gdi_BitBlt(UINT32 SrcFormat, UINT32 DstFormat)
|
||||
failed = TRUE;
|
||||
}
|
||||
|
||||
gdi_SelectObject(hdcDst, NULL);
|
||||
gdi_DeleteObject((HGDIOBJECT)brush);
|
||||
rc = !failed;
|
||||
fail:
|
||||
|
||||
@ -567,6 +573,7 @@ fail:
|
||||
|
||||
int TestGdiBitBlt(int argc, char* argv[])
|
||||
{
|
||||
int rc = 0;
|
||||
UINT32 x, y;
|
||||
const UINT32 formatList[] =
|
||||
{
|
||||
@ -600,10 +607,10 @@ int TestGdiBitBlt(int argc, char* argv[])
|
||||
fprintf(stderr, "test_gdi_BitBlt(SrcFormat=%s, DstFormat=%s) failed!\n",
|
||||
GetColorFormatName(formatList[x]),
|
||||
GetColorFormatName(formatList[y]));
|
||||
return -1;
|
||||
rc = -y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ int TestGdiEllipse(int argc, char* argv[])
|
||||
if (!gdi_BitBlt(hdc, 0, 0, 16, 16, hdc, 0, 0, GDI_WHITENESS, hPalette))
|
||||
{
|
||||
printf("gdi_BitBlt failed (line #%u)\n", __LINE__);
|
||||
return -1;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!gdi_Ellipse(hdc, 0, 0, 16, 16))
|
||||
|
Loading…
Reference in New Issue
Block a user