Changeset 8602


Ignore:
Timestamp:
Jun 8, 2002, 1:45:20 PM (23 years ago)
Author:
sandervl
Message:

clipper bugfix

Location:
trunk/src/ddraw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/ddraw/OS2SURFACE.CPP

    r7940 r8602  
    1 /* $Id: OS2SURFACE.CPP,v 1.40 2002-02-17 20:40:05 sandervl Exp $ */
     1/* $Id: OS2SURFACE.CPP,v 1.41 2002-06-08 11:45:19 sandervl Exp $ */
    22
    33/*
     
    24762476                          return DD_OK;
    24772477                      }
     2478                      dprintf(("visible region"));
    24782479                      for(i=0;i<lpRgnData->rdh.nCount;i++)
    24792480                      {
     
    24812482                          pRectl[i].yTop     = dest->DDSurfaceDesc.dwHeight - pRectl[i].yBottom;
    24822483                          pRectl[i].yBottom  = dest->DDSurfaceDesc.dwHeight - temp;
     2484                          dprintf(("(%d,%d)(%d,%d)", pRectl[i].xLeft, pRectl[i].yBottom, pRectl[i].xRight, pRectl[i].yTop));
    24832485                          //clip rectangle must be relative to lScreenPos
    24842486                          pRectl[i].xLeft   -= sBlt.lScreenPosX;
     
    24862488                          pRectl[i].yTop    -= sBlt.lScreenPosY;
    24872489                          pRectl[i].yBottom -= sBlt.lScreenPosY;
     2490                          dprintf(("(%d,%d)(%d,%d)", pRectl[i].xLeft, pRectl[i].yBottom, pRectl[i].xRight, pRectl[i].yTop));
    24882491                      }
    24892492                      fChanged = TRUE;
  • TabularUnified trunk/src/ddraw/oslibgpi.cpp

    r7104 r8602  
    1 /* $Id: oslibgpi.cpp,v 1.3 2001-10-18 07:49:37 sandervl Exp $ */
     1/* $Id: oslibgpi.cpp,v 1.4 2002-06-08 11:45:20 sandervl Exp $ */
    22
    33/*
     
    3030    LPRGNDATA lpRgnData = 0;
    3131    HPS hps = 0;
    32     LONG temp, i;
     32    LONG temp, i, lComplexity;
    3333    ULONG bufSizeNeeded;
    3434    PRECTL pRectl;
     35    HWND hwndClientOS2;
    3536
    3637    if(screenHeight == 0) {
     
    4041    }
    4142
    42     hps = WinGetPS(Win32ToOS2FrameHandle(hwnd));
     43//    hps = WinGetPS(Win32ToOS2FrameHandle(hwnd));
     44    hwndClientOS2 = Win32ToOS2Handle(hwnd);
     45    hps = WinGetPS(hwndClientOS2);
    4346    if(hps == NULL) {
    4447        dprintf(("OSLibQueryVisibleRegion: WinGetPS %x failed", hwnd));
     
    4649    }
    4750    hrgnVis = GreCreateRectRegion(hps, &rcl, 1);
    48     GreCopyClipRegion(hps, hrgnVis, 0, COPYCRGN_VISRGN);
     51
     52    //If there's an update region, use it. else get visible region
     53    lComplexity = WinQueryUpdateRegion(hwndClientOS2, hrgnVis);
     54    if(lComplexity == RGN_ERROR || lComplexity == RGN_NULL)
     55    {
     56        dprintf(("No update region; take visible region"));
     57        GreCopyClipRegion(hps, hrgnVis, 0, COPYCRGN_VISRGN);
     58    }
    4959
    5060    RGNRECT rgnRect;
     
    6878    }
    6979    for(i=0;i<rgnRect.crcReturned;i++) {
     80        dprintf(("Region rect %d (%d,%d)(%d,%d)", i, pRectl[i].xLeft, pRectl[i].yBottom, pRectl[i].xRight, pRectl[i].yTop));
     81        //rectangle is in window coordinate; convert to screen
     82        WinMapWindowPoints(hwndClientOS2, HWND_DESKTOP, (PPOINTL)&pRectl[i], 2);
     83        dprintf(("Region rect %d (%d,%d)(%d,%d)", i, pRectl[i].xLeft, pRectl[i].yBottom, pRectl[i].xRight, pRectl[i].yTop));
    7084        temp = pRectl[i].yTop;
    71         dprintf(("Region rect %d (%d,%d)(%d,%d)", i, pRectl[i].xLeft, pRectl[i].yBottom, pRectl[i].xRight, pRectl[i].yTop));
    7285        pRectl[i].yTop    = screenHeight - pRectl[i].yBottom;
    7386        pRectl[i].yBottom = screenHeight - temp;
Note: See TracChangeset for help on using the changeset viewer.