Ignore:
Timestamp:
Aug 30, 2000, 8:05:25 PM (25 years ago)
Author:
sandervl
Message:

workaround for palette problems in PowerDVD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/blit.cpp

    r4034 r4127  
    1 /* $Id: blit.cpp,v 1.16 2000-08-18 18:14:56 sandervl Exp $ */
     1/* $Id: blit.cpp,v 1.17 2000-08-30 18:05:24 sandervl Exp $ */
    22
    33/*
     
    225225                           const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
    226226{
    227 #if 1
    228227 INT rc;
    229228
     
    263262                DIBSection *destdib = DIBSection::findHDC(hdc);
    264263                if(destdib) {
    265                         destdib->sync(hdc, yDst, heightDst);
     264                        if(widthDst == widthSrc && heightDst == heightSrc &&
     265                           destdib->GetBitCount() == infoLoc->bmiHeader.biBitCount &&
     266                           destdib->GetBitCount() == 8)
     267                        {
     268                                destdib->sync(xDst, yDst, widthDst, heightDst, (PVOID)bits);
     269                        }
     270                        else    destdib->sync(hdc, yDst, heightDst);
    266271                }
    267272        }
     
    277282    else {
    278283        DIBSection *destdib = DIBSection::findHDC(hdc);
    279         if(destdib) {
    280                 destdib->sync(hdc, yDst, heightDst);
    281         }
     284        if(destdib) {
     285                if(widthDst == widthSrc && heightDst == heightSrc &&
     286                   destdib->GetBitCount() == info->bmiHeader.biBitCount &&
     287                   destdib->GetBitCount() == 8)
     288                {
     289                        destdib->sync(xDst, yDst, widthDst, heightDst, (PVOID)bits);
     290                }
     291                else    destdib->sync(hdc, yDst, heightDst);
     292        }
    282293    }
    283294
    284295    return rc;
    285 #else
    286     dprintf(("GDI32: StretchDIBits\n"));
    287     return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13);
    288 #endif
    289296}
    290297//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.