HGDI_BITMAP hBmpSrc;
HGDI_BITMAP hBmpDst;
HGDI_BITMAP hBmpDstOriginal;
+ HGDI_BRUSH brush;
gdiPalette g;
gdiPalette* hPalette = &g;
g.format = 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,
failed = TRUE;
}
+ gdi_SelectObject(hdcDst, NULL);
+ gdi_DeleteObject((HGDIOBJECT)brush);
rc = !failed;
fail:
int TestGdiBitBlt(int argc, char* argv[])
{
+ int rc = 0;
UINT32 x, y;
const UINT32 formatList[] =
{
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;
}
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))