Ignore:
Timestamp:
Jun 3, 2001, 4:52:47 PM (24 years ago)
Author:
sandervl
Message:

rgb conversions added + palette fix

File:
1 edited

Legend:

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

    r5825 r5901  
    1 /* $Id: palette.cpp,v 1.9 2001-05-29 09:45:21 sandervl Exp $ */
     1/* $Id: palette.cpp,v 1.10 2001-06-03 14:52:47 sandervl Exp $ */
    22
    33/*
     
    5858    rc = O32_RealizePalette(hdc);
    5959    dprintf(("GDI32: RealizePalette %x returned %d", hdc, rc));
     60    if(rc && DIBSection::getSection() != NULL)
     61    {
     62        DIBSection *dsect = DIBSection::findHDC(hdc);
     63        if(dsect)
     64        {
     65            dsect->sync(hdc, 0, dsect->GetHeight());
     66        }
     67    }
    6068    return rc;
    6169}
     
    8593  dprintf(("GDI32: SelectPalette (0x%08X, 0x%08X, 0x%08X)", hdc, hPalette, bForceBackground));
    8694  hPal = O32_SelectPalette(hdc, hPalette, bForceBackground);
    87 
    88   //hack for beyond compare buttons (+ other apps)
    89   //seems to select old palette into dc before unselecting dib section
    90   if(bForceBackground != -1 && DIBSection::getSection() != NULL)
    91   {
    92     DIBSection *dsect = DIBSection::findHDC(hdc);
    93     if(dsect)
    94     {
    95         dsect->sync(hdc, 0, dsect->GetHeight());
    96     }
    97   }
    9895  return hPal;
    9996}
Note: See TracChangeset for help on using the changeset viewer.