Am Freitag, den 11.09.2009, 09:04 +0200 schrieb Paul Vriens: > Hi Markus, > > One I see is a style issue with the if statement. There shouldn't be a > space after the opening and before the closing bracket. > > Another thing (style again) is that maybe it's nicer to return FALSE > instead of ret (as is done throughout this file). >
Resending the desired changes and hoping to see them finding their way into git ... Best regards.
diff -ru wine/dlls/gdi32/bitblt.c new/dlls/gdi32/bitblt.c --- wine/dlls/gdi32/bitblt.c 2009-09-10 22:44:09.000000000 +0200 +++ new/dlls/gdi32/bitblt.c 2009-09-11 09:08:09.000000000 +0200 @@ -518,9 +518,11 @@ DC *dcDst, *dcSrc; dcSrc = get_dc_ptr( hdcSrc ); + if (!dcSrc) return FALSE; + if ((dcDst = get_dc_ptr( hdcDst ))) { - if (dcSrc) update_dc( dcSrc ); + update_dc( dcSrc ); update_dc( dcDst ); TRACE("%p %d,%d %dx%d -> %p %d,%d %dx%d op=%02x flags=%02x srcconstalpha=%02x alphafmt=%02x\n", hdcSrc, xSrc, ySrc, widthSrc, heightSrc, @@ -533,7 +535,7 @@ xSrc, ySrc, widthSrc, heightSrc, blendFunction ); release_dc_ptr( dcDst ); } - if (dcSrc) release_dc_ptr( dcSrc ); + release_dc_ptr( dcSrc ); return ret; } diff -ru wine/dlls/gdi32/tests/bitmap.c new/dlls/gdi32/tests/bitmap.c --- wine/dlls/gdi32/tests/bitmap.c 2009-09-10 22:44:09.000000000 +0200 +++ new/dlls/gdi32/tests/bitmap.c 2009-09-11 00:35:22.000000000 +0200 @@ -2393,6 +2393,10 @@ expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, -1, 0, 30, 30, blend), TRUE, BOOL, "%d"); expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, -1, 30, 30, blend), TRUE, BOOL, "%d"); + SetLastError(0xdeadbeef); + expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, NULL, 0, 0, 20, 20, blend), FALSE, BOOL, "%d"); + expect_eq(GetLastError(), 0xdeadbeef, int, "%d"); + SelectObject(hdcDst, oldDst); SelectObject(hdcSrc, oldSrc); DeleteObject(bmpSrc);