Changeset 8602 for trunk/src/ddraw/oslibgpi.cpp
- Timestamp:
- Jun 8, 2002, 1:45:20 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.