Fixed tests and not intialized values.

This commit is contained in:
Armin Novak 2016-08-17 09:01:27 +02:00
parent 0c57065c73
commit dbab3dd7e3
3 changed files with 11 additions and 4 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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))