Changeset 1606 for trunk/src


Ignore:
Timestamp:
Nov 5, 1999, 10:17:27 AM (26 years ago)
Author:
sandervl
Message:

EBs fixes

Location:
trunk/src
Files:
7 edited

Legend:

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

    r1533 r1606  
    1 /* $Id: gdi32.cpp,v 1.12 1999-10-31 21:38:17 achimha Exp $ */
     1/* $Id: gdi32.cpp,v 1.13 1999-11-05 09:17:27 sandervl Exp $ */
    22
    33/*
     
    297297//******************************************************************************
    298298//******************************************************************************
    299 int WIN32API StretchDIBits( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, const void * arg10, const BITMAPINFO *arg11, UINT arg12, DWORD arg13)
    300 {
     299INT WIN32API StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
     300                           INT heightDst, INT xSrc, INT ySrc, INT widthSrc,
     301                           INT heightSrc, const void *bits,
     302                           const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
     303{
     304#if 1
     305    dprintf(("GDI32: StretchDIBits"));
     306
     307    if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
     308    {
     309      // workaround for open32 bug.
     310      // If syscolors > 256 and wUsage == DIB_PAL_COLORS.
     311
     312      int i;
     313      USHORT *pColorIndex = (USHORT *)info->bmiColors;
     314      RGBQUAD *pColors = (RGBQUAD *) alloca(info->bmiHeader.biClrUsed *
     315                         sizeof(RGBQUAD));
     316      BITMAPINFO *infoLoc = (BITMAPINFO *) alloca(sizeof(BITMAPINFO) +
     317                             info->bmiHeader.biClrUsed * sizeof(RGBQUAD));
     318
     319      memcpy(infoLoc, info, sizeof(BITMAPINFO));
     320
     321      if(GetDIBColorTable(hdc, 0, info->bmiHeader.biClrUsed, pColors) == 0)
     322        return FALSE;
     323
     324      for(i=0;i<info->bmiHeader.biClrUsed;i++, pColorIndex++)
     325      {
     326         infoLoc->bmiColors[i] = pColors[*pColorIndex];
     327      }
     328
     329      return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
     330                               widthSrc, heightSrc, (void *)bits,
     331                               (PBITMAPINFO)infoLoc, DIB_RGB_COLORS, dwRop);
     332    }
     333
     334    return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,
     335                             widthSrc, heightSrc, (void *)bits,
     336                             (PBITMAPINFO)info, wUsage, dwRop);
     337#else
    301338    dprintf(("GDI32: StretchDIBits\n"));
    302339    return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13);
     340#endif
    303341}
    304342//******************************************************************************
     
    20542092 int i;
    20552093
    2056   dprintf(("GDI32: OS2GetDIBColorTable, not implemented?\n"));
    20572094  rc = O32_GetPaletteEntries(hpal,
    20582095                         uStartIndex,
     
    20632100      i++)
    20642101  {
     2102    BYTE tmp;
     2103    tmp = pColors[i].rgbBlue;
     2104    pColors[i].rgbBlue = pColors[i].rgbRed;
     2105    pColors[i].rgbRed = tmp;
    20652106    pColors[i].rgbReserved = 0;
    20662107  }
    2067   dprintf(("GDI32: GetDIBColor returns %d\n", rc));
     2108  dprintf(("GDI32: GetDIBColorTable returns %d\n", rc));
    20682109  return(rc);
    20692110}
  • trunk/src/ole32/oleClip.cpp

    r872 r1606  
    1 /* $Id: oleClip.cpp,v 1.2 1999-09-08 11:29:28 davidr Exp $ */
     1/* $Id: oleClip.cpp,v 1.3 1999-11-05 09:15:51 sandervl Exp $ */
    22/*
    33 *
     
    701701
    702702//  if ( !( atom = GlobalFindAtomA(OLEClipbrd_WNDCLASS) ) || !( CLASS_FindClassByAtom(atom, 0) ) )
    703   if ( !( atom = GlobalFindAtomA(OLEClipbrd_WNDCLASS) ) )
    704   {
     703//  if ( !( atom = GlobalFindAtomA(OLEClipbrd_WNDCLASS) ) )
     704//  {
    705705    ZeroMemory( &wcex, sizeof(WNDCLASSEXA));
    706706
     
    715715
    716716    RegisterClassExA(&wcex);
    717   }
     717//  }
    718718
    719719  /*
  • trunk/src/user32/loadres.cpp

    r1592 r1606  
    1 /* $Id: loadres.cpp,v 1.12 1999-11-04 13:02:49 phaller Exp $ */
     1/* $Id: loadres.cpp,v 1.13 1999-11-05 09:16:21 sandervl Exp $ */
    22
    33/*
     
    3434    if(winres == NULL) {
    3535        dprintf(("LoadStringA NOT FOUND from %X, id %d buffersize %d\n", hinst, wID, cchBuffer));
     36//TODO: BAD HACK!
     37        if(cchBuffer > 3)
     38        {
     39          strcpy(lpBuffer, "XXX");
     40          return 3;
     41        }
     42//TODO: BAD HACK!
    3643        *lpBuffer = 0;
    3744        return 0;
  • trunk/src/user32/oslibmsg.cpp

    r1504 r1606  
    1 /* $Id: oslibmsg.cpp,v 1.6 1999-10-28 22:41:00 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.7 1999-11-05 09:16:22 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    145145  }
    146146
     147  if(msg >= WIN32APP_USERMSGBASE)
     148    return msg - WIN32APP_USERMSGBASE;
     149
    147150  for(int i=0;i<MAX_MSGTRANSTAB;i++)
    148151  {
  • trunk/src/user32/win32class.cpp

    r1540 r1606  
    1 /* $Id: win32class.cpp,v 1.5 1999-11-01 19:11:42 sandervl Exp $ */
     1/* $Id: win32class.cpp,v 1.6 1999-11-05 09:16:22 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Managment Code for OS/2
     
    158158  }
    159159  if(fUnicode) {
    160     return (lstrcmpW(classNameW, (LPWSTR)classname) == 0);
    161   }
    162   else  return (strcmp(classNameA, classname) == 0);
     160        if(classNameW)
     161                return (lstrcmpW(classNameW, (LPWSTR)classname) == 0);
     162        return FALSE;
     163  }
     164  else {
     165        if(classNameA)
     166                return (strcmp(classNameA, classname) == 0);
     167        return FALSE;
     168  }
    163169}
    164170//******************************************************************************
     
    177183  if(HIWORD(id) != 0) {
    178184//CB: read comment below!
    179         if(stricmp(wndclass->classNameA, id) == 0 && wndclass->hInstance == hInstance) {
     185        if(lstrcmpiA(wndclass->classNameA, id) == 0 && wndclass->hInstance == hInstance) {
    180186                leaveMutex(OBJTYPE_CLASS);
    181187                return(wndclass);
     
    184190                wndclass = (Win32WndClass *)wndclass->GetNext();
    185191                while(wndclass != NULL) {
    186                         if(stricmp(wndclass->classNameA, id) == 0)
     192                        if(lstrcmpiA(wndclass->classNameA, id) == 0)
    187193                        {
    188194                                //SvL: According to Wine, if the instance handle is the one of the main exe, everything is ok
  • trunk/src/user32/win32wbase.cpp

    r1583 r1606  
    1 /* $Id: win32wbase.cpp,v 1.75 1999-11-03 22:04:22 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.76 1999-11-05 09:16:22 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    24862486BOOL Win32BaseWindow::hasWindowName(LPSTR wndname, BOOL fUnicode)
    24872487{
     2488    if(wndname == NULL)
     2489      return FALSE; 
     2490
    24882491    if(fUnicode) {
    24892492            return (lstrcmpW(windowNameW, (LPWSTR)wndname) == 0);
  • trunk/src/user32/window.cpp

    r1540 r1606  
    1 /* $Id: window.cpp,v 1.32 1999-11-01 19:11:45 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.33 1999-11-05 09:16:22 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    14231423//******************************************************************************
    14241424//******************************************************************************
    1425 UINT WIN32API ArrangeIconicWindows( HWND arg1)
    1426 {
    1427 #ifdef DEBUG
    1428     WriteLog("USER32:  ArrangeIconicWindows\n");
    1429 #endif
    1430     return O32_ArrangeIconicWindows(arg1);
     1425UINT WIN32API ArrangeIconicWindows( HWND hwnd)
     1426{
     1427    dprintf(("USER32:  ArrangeIconicWindows %x", hwnd));
     1428    return O32_ArrangeIconicWindows(Win32BaseWindow::Win32ToOS2FrameHandle(hwnd));
    14311429}
    14321430//******************************************************************************
     
    14451443//******************************************************************************
    14461444//******************************************************************************
    1447 BOOL WIN32API ShowOwnedPopups( HWND arg1, BOOL  arg2)
    1448 {
    1449     dprintf(("USER32:  ShowOwnedPopups\n"));
    1450     return O32_ShowOwnedPopups(arg1, arg2);
    1451 }
    1452 //******************************************************************************
    1453 //******************************************************************************
    1454 
     1445BOOL WIN32API ShowOwnedPopups( HWND hwnd, BOOL  arg2)
     1446{
     1447    dprintf(("USER32:  ShowOwnedPopups %x", hwnd));
     1448    return O32_ShowOwnedPopups(Win32BaseWindow::Win32ToOS2FrameHandle(hwnd), arg2);
     1449}
     1450//******************************************************************************
     1451//******************************************************************************
     1452
Note: See TracChangeset for help on using the changeset viewer.