Changeset 8602
- Timestamp:
- Jun 8, 2002, 1:45:20 PM (23 years ago)
- 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.4 0 2002-02-17 20:40:05sandervl Exp $ */1 /* $Id: OS2SURFACE.CPP,v 1.41 2002-06-08 11:45:19 sandervl Exp $ */ 2 2 3 3 /* … … 2476 2476 return DD_OK; 2477 2477 } 2478 dprintf(("visible region")); 2478 2479 for(i=0;i<lpRgnData->rdh.nCount;i++) 2479 2480 { … … 2481 2482 pRectl[i].yTop = dest->DDSurfaceDesc.dwHeight - pRectl[i].yBottom; 2482 2483 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)); 2483 2485 //clip rectangle must be relative to lScreenPos 2484 2486 pRectl[i].xLeft -= sBlt.lScreenPosX; … … 2486 2488 pRectl[i].yTop -= sBlt.lScreenPosY; 2487 2489 pRectl[i].yBottom -= sBlt.lScreenPosY; 2490 dprintf(("(%d,%d)(%d,%d)", pRectl[i].xLeft, pRectl[i].yBottom, pRectl[i].xRight, pRectl[i].yTop)); 2488 2491 } 2489 2492 fChanged = TRUE; -
TabularUnified trunk/src/ddraw/oslibgpi.cpp ¶
r7104 r8602 1 /* $Id: oslibgpi.cpp,v 1. 3 2001-10-18 07:49:37sandervl Exp $ */1 /* $Id: oslibgpi.cpp,v 1.4 2002-06-08 11:45:20 sandervl Exp $ */ 2 2 3 3 /* … … 30 30 LPRGNDATA lpRgnData = 0; 31 31 HPS hps = 0; 32 LONG temp, i ;32 LONG temp, i, lComplexity; 33 33 ULONG bufSizeNeeded; 34 34 PRECTL pRectl; 35 HWND hwndClientOS2; 35 36 36 37 if(screenHeight == 0) { … … 40 41 } 41 42 42 hps = WinGetPS(Win32ToOS2FrameHandle(hwnd)); 43 // hps = WinGetPS(Win32ToOS2FrameHandle(hwnd)); 44 hwndClientOS2 = Win32ToOS2Handle(hwnd); 45 hps = WinGetPS(hwndClientOS2); 43 46 if(hps == NULL) { 44 47 dprintf(("OSLibQueryVisibleRegion: WinGetPS %x failed", hwnd)); … … 46 49 } 47 50 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 } 49 59 50 60 RGNRECT rgnRect; … … 68 78 } 69 79 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)); 70 84 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));72 85 pRectl[i].yTop = screenHeight - pRectl[i].yBottom; 73 86 pRectl[i].yBottom = screenHeight - temp;
Note:
See TracChangeset
for help on using the changeset viewer.