From: yangkun yangkun@uniontech.com
Signed-off-by: yangkun yangkun@uniontech.com Change-Id: Ic3c64a5d2ffef7d890f461b089223fbd7a972ffd --- dlls/win32u/bitblt.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/win32u/bitblt.c b/dlls/win32u/bitblt.c index a9f6f70daf6..55379628927 100644 --- a/dlls/win32u/bitblt.c +++ b/dlls/win32u/bitblt.c @@ -857,6 +857,7 @@ BOOL WINAPI NtGdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDes int oldStretchMode; DIBSECTION dib; DC *dc_src; + DC *dc_work;
if(widthDest < 0 || heightDest < 0 || widthSrc < 0 || heightSrc < 0) { TRACE("Cannot mirror\n"); @@ -890,6 +891,10 @@ BOOL WINAPI NtGdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDes } else bmpWork = NtGdiCreateCompatibleBitmap( hdcDest, widthDest, heightDest ); oldWork = NtGdiSelectBitmap(hdcWork, bmpWork); + + if (!(dc_work = get_dc_ptr(hdcWork))) goto error; + dc_work->attr->stretch_blt_mode = COLORONCOLOR; + if (!NtGdiStretchBlt( hdcWork, 0, 0, widthDest, heightDest, hdcSrc, xSrc, ySrc, widthSrc, heightSrc, SRCCOPY, 0 )) { @@ -937,6 +942,8 @@ error: release_dc_ptr( dc_src ); NtGdiGetAndSetDCDword( hdcDest, NtGdiSetBkColor, oldBackground, NULL ); NtGdiGetAndSetDCDword( hdcDest, NtGdiSetTextColor, oldForeground, NULL ); + if(dc_work) release_dc_ptr( dc_work ); + if(hdcWork) { NtGdiSelectBitmap(hdcWork, oldWork); NtGdiDeleteObjectApp( hdcWork );