Changeset 8097 for trunk/src


Ignore:
Timestamp:
Mar 18, 2002, 2:03:53 PM (23 years ago)
Author:
sandervl
Message:

PF: fix for 24 bpp bitmaps

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/dib.cpp

    r4601 r8097  
    1 /* $Id: dib.cpp,v 1.8 2000-11-15 20:44:26 sandervl Exp $ */
     1/* $Id: dib.cpp,v 1.9 2002-03-18 13:03:53 sandervl Exp $ */
    22
    33/*
     
    8282    else  /* assume BITMAPINFOHEADER */
    8383    {
    84         colors = info->bmiHeader.biClrUsed;
    85         if (!colors && (info->bmiHeader.biBitCount <= 8))
    86             colors = 1 << info->bmiHeader.biBitCount;
     84#ifdef __WIN32OS2__
     85        /* many windows apps write bitmaps that have 0x1000000 in biClrUsed when
     86           in 24 bpp, so I think we can do generic action 24bpp - no clrUsed */
     87        colors = 0;
     88        if (info->bmiHeader.biBitCount <= 8)
     89        {
     90#endif
     91           colors = info->bmiHeader.biClrUsed;
     92           if (!colors)
     93              colors = 1 << info->bmiHeader.biBitCount;
     94#ifdef __WIN32OS2__
     95        }
     96#endif
    8797        return sizeof(BITMAPINFOHEADER) + colors *
    8898               ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD));
  • trunk/src/user32/oslibwin.cpp

    r8035 r8097  
    1 /* $Id: oslibwin.cpp,v 1.115 2002-03-05 16:09:17 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.116 2002-03-18 13:03:53 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    250250  return WinSetWindowULong(hwnd, offset, value);
    251251}
     252//******************************************************************************
     253//******************************************************************************
     254BOOL OSLibWinGetMinPosition(HWND hwnd, PSWP pswp, PPOINTL pointl)
     255{
     256  return WinGetMinPosition(hwnd, pswp, pointl);
     257}
     258
    252259//******************************************************************************
    253260//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r7780 r8097  
    1 /* $Id: oslibwin.h,v 1.64 2002-01-20 15:26:21 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.65 2002-03-18 13:03:53 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    2828   ULONG   ulReserved2;
    2929} SWP, *PSWP;
     30typedef POINTL *PPOINTL;
    3031#endif
    3132
     
    198199BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText);
    199200BOOL OSLibWinQueryPointerPos(PPOINT pptlPoint); //pptlPoint == POINTL pointer!
     201BOOL OSLibWinGetMinPosition(HWND hwndDlg,PSWP swp, PPOINTL pointl);
    200202BOOL OSLibWinSetPointerPos(int x, int y);
    201203
Note: See TracChangeset for help on using the changeset viewer.