diff --git "a/win32ss/gdi/ntgdi/dibobj.c" "b/win32ss/gdi/ntgdi/dibobj.c" index 60eb419ca20..48087615ac1 100644 --- "a/win32ss/gdi/ntgdi/dibobj.c" +++ "b/win32ss/gdi/ntgdi/dibobj.c" @@ -498,6 +498,7 @@ NtGdiSetDIBitsToDeviceInternal( PPALETTE ppalDIB = NULL; LPBITMAPINFO pbmiSafe; BOOL bResult; + ROP4 rop4 = ROP4_SRCCOPY; if (!Bits) return 0; @@ -678,6 +679,10 @@ NtGdiSetDIBitsToDeviceInternal( ptSource.y -= SourceSize.cy; } + /* HACK fix for black/bad icons in some toolbars (CORE-18070). */ + if (!pMaskSurf && cjMaxInfo != 44 && Height == Width) + rop4 = ROP4_SRCAND; + bResult = IntEngBitBlt(pDestSurf, pSourceSurf, pMaskSurf, @@ -688,7 +693,7 @@ NtGdiSetDIBitsToDeviceInternal( pMaskSurf ? &ptSource : NULL, NULL, NULL, - pMaskSurf ? ROP4_MASK : ROP4_FROM_INDEX(R3_OPINDEX_SRCCOPY)); + pMaskSurf ? ROP4_MASK : rop4); /* Cleanup EXLATEOBJ */ EXLATEOBJ_vCleanup(&exlo);