diff --git "a/win32ss/gdi/ntgdi/dibobj.c" "b/win32ss/gdi/ntgdi/dibobj.c" index ec5fa69a469..cce547956f7 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; @@ -654,6 +655,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, @@ -664,7 +677,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);