diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 5ae7cc653d1..9a33e343f94 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1967,7 +1967,7 @@ BOOL WINAPI GdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int return FALSE; return NtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src, x_src, y_src, width_src, height_src, - blend_function, 0 /* FIXME */ ); + *(DWORD *)&blend_function, 0 /* FIXME */ ); } /*********************************************************************** diff --git a/dlls/win32u/bitblt.c b/dlls/win32u/bitblt.c index 01ec347baad..8383a1d9dcd 100644 --- a/dlls/win32u/bitblt.c +++ b/dlls/win32u/bitblt.c @@ -955,8 +955,9 @@ error: */ BOOL WINAPI NtGdiAlphaBlend( HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, - BLENDFUNCTION blendFunction, HANDLE xform ) + DWORD blend_func, HANDLE xform ) { + BLENDFUNCTION blendFunction = *(BLENDFUNCTION *)&blend_func; BOOL ret = FALSE; DC *dcDst, *dcSrc; diff --git a/dlls/win32u/cursoricon.c b/dlls/win32u/cursoricon.c index 5ae886187f2..bf4b1c3ac23 100644 --- a/dlls/win32u/cursoricon.c +++ b/dlls/win32u/cursoricon.c @@ -707,11 +707,11 @@ BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width, } if (alpha_blend) { - BLENDFUNCTION pixelblend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA }; NtGdiSelectBitmap( mem_dc, obj->frame.alpha ); if (NtGdiAlphaBlend( hdc_dest, x, y, width, height, mem_dc, 0, 0, obj->frame.width, obj->frame.height, - pixelblend, 0 )) goto done; + MAKEFOURCC( AC_SRC_OVER, 0, 255, AC_SRC_ALPHA ), 0 )) + goto done; } } diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 6088321599e..6e361973f0e 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -37,7 +37,7 @@ struct unix_funcs /* win32u functions */ BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - BLENDFUNCTION blend_function, HANDLE xform ); + DWORD blend_function, HANDLE xform ); BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ); BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 9ad14424c2a..b720f561474 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -26,7 +26,7 @@ static const struct unix_funcs *unix_funcs; BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - BLENDFUNCTION blend_function, HANDLE xform ) + DWORD blend_function, HANDLE xform ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src, diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index f01df37a400..533983ecf1e 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1613,10 +1613,11 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP ); + if (info->dwFlags & ULW_ALPHA) blend = *info->pblend; ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, - (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 ); + *(DWORD *)&blend, 0 ); if (ret) { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 104100a0770..c35e92b3e2a 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1972,7 +1972,7 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, if (!(ret = NtGdiAlphaBlend(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, - blend, 0))) + *(DWORD *)&blend, 0))) goto done; if ((data = get_win_data(hwnd))) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 3b49b7e1d08..8399a816fa7 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2948,10 +2948,11 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP ); + if (info->dwFlags & ULW_ALPHA) blend = *info->pblend; ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, - (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 ); + *(DWORD *)&blend, 0 ); if (ret) { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); diff --git a/include/ntgdi.h b/include/ntgdi.h index 918a5c5d7b3..0f989189045 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -250,7 +250,7 @@ INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files DWORD tid, void *dv ); BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - BLENDFUNCTION blend_function, HANDLE xform ); + DWORD blend_function, HANDLE xform ); BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, DWORD sweep_angle ); BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,