diff --git "a/win32ss/gdi/ntgdi/dibobj.c" "b/win32ss/gdi/ntgdi/dibobj.c" index 456210d880a..d9a7c262424 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; if (!Bits) return 0; @@ -678,6 +679,18 @@ NtGdiSetDIBitsToDeviceInternal( ptSource.y -= SourceSize.cy; } + /* This is the fix for the black icons in the toolbars */ + /* It is a HACK, but might work until it can really be fixed */ + if(StartScan == 0 && bmi->bmiHeader.biHeight == ScanLines && + bmi->bmiHeader.biBitCount == 32 && + (ScanLines == 16 || ScanLines == 24 || ScanLines == 32)) + { + rop4 = ROP4_SRCAND; + } + else + { + rop4 = ROP4_FROM_INDEX(R3_OPINDEX_SRCCOPY); + } bResult = IntEngBitBlt(pDestSurf, pSourceSurf, pMaskSurf, @@ -688,7 +701,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);