Changeset 9359 for trunk/src


Ignore:
Timestamp:
Oct 28, 2002, 2:24:44 PM (23 years ago)
Author:
sandervl
Message:

Workaround added for WGSS GetDIBits bug

File:
1 edited

Legend:

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

    r8874 r9359  
    1 /* $Id: dibitmap.cpp,v 1.33 2002-07-15 11:19:51 sandervl Exp $ */
     1/* $Id: dibitmap.cpp,v 1.34 2002-10-28 13:24:44 sandervl Exp $ */
    22
    33/*
     
    373373                       void *lpvBits, PBITMAPINFO lpbi, UINT uUsage)
    374374{
    375  int nrlines;
     375    int nrlines;
    376376
    377377    dprintf(("GDI32: GetDIBits %x %x %d %d %x %x (biBitCount %d) %d", hdc, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, lpbi->bmiHeader.biBitCount, uUsage));
     
    381381    HDC hdcMem = CreateCompatibleDC(0);
    382382
    383     nrlines = O32_GetDIBits(hdcMem, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage);
     383    if(lpbi->bmiHeader.biHeight < 0) {
     384        //NOTE: workaround for WGSS bug; remove when fixed
     385        LONG height = lpbi->bmiHeader.biHeight;
     386
     387        nrlines = O32_GetDIBits(hdcMem, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage);
     388
     389        //NOTE: workaround for WGSS bug; remove when fixed
     390        lpbi->bmiHeader.biHeight = height;
     391    }
     392    else {
     393        nrlines = O32_GetDIBits(hdcMem, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage);
     394    }
    384395
    385396    DeleteDC(hdcMem);
Note: See TracChangeset for help on using the changeset viewer.