Changeset 13836 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Nov 5, 2008 2:42:54 AM (16 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/drv.c
r8155 r13836 87 87 { 88 88 PPDEV ppdev = (PPDEV)pso->dhpdev; 89 90 /* The screen surface has the 'pso->dhpdev' field, 89 90 /* The screen surface has the 'pso->dhpdev' field, 91 91 * and is either the screen device surface with handle = hsurfScreen, 92 92 * or a surface derived from DDRAW with address equal to the framebuffer. … … 302 302 303 303 STATPRINT; 304 304 305 305 #ifdef VBOX_VBVA_ADJUST_RECT 306 /* Experimental fix for too large bitmap updates. 306 /* Experimental fix for too large bitmap updates. 307 307 * 308 308 * Some application do a large bitmap update event if only … … 312 312 * the current framebuffer content with the source bitmap. 313 313 * 314 * The optimization is only active when: 314 * The optimization is only active when: 315 315 * - the VBVA extension is enabled; 316 316 * - the source bitmap is not cacheable; … … 597 597 DISPDBG((1, "DrvSaveScreenBits: SS_SAVE %d\n", ppdev->cSSB)); 598 598 599 if (ppdev->cSSB >= ELEMENTS(ppdev->aSSB))599 if (ppdev->cSSB >= RT_ELEMENTS(ppdev->aSSB)) 600 600 { 601 601 /* All slots are already in use. Fail. */ -
trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdp.c
r8155 r13836 231 231 prcl->right = x + w; 232 232 prcl->bottom = y + h; 233 233 234 234 DISPDBG((1, "vrdpAdjustRect: result %d-%d %d-%d\n", prcl->left, prcl->right, prcl->top, prcl->bottom)); 235 235 } … … 1194 1194 ULONG ulForeRGB = pboFore? vrdpColor2RGB (pso, pboFore->iSolidColor): 0; 1195 1195 ULONG ulBackRGB = pboOpaque? vrdpColor2RGB (pso, pboOpaque->iSolidColor): 0; 1196 1196 1197 1197 DISPDBG((1, "VRDP::vrdpTextOut: calling vboxReportText fg %x bg %x\n", 1198 1198 ulForeRGB, ulBackRGB)); 1199 1199 1200 1200 if (!vboxReportText (ppdev, &clipRects, pstro, pfo, prclOpaque, ulForeRGB, ulBackRGB)) 1201 1201 { … … 1345 1345 static void vrdpPolyPointsAdd (VRDPORDERPOLYPOINTS *pPoints, const VRDPORDERPOINT *ppt) 1346 1346 { 1347 VBVA_ASSERT(pPoints->c < ELEMENTS(pPoints->a));1347 VBVA_ASSERT(pPoints->c < RT_ELEMENTS(pPoints->a)); 1348 1348 1349 1349 pPoints->a[pPoints->c] = *ppt; … … 1517 1517 vrdpExtendOrderBounds (&bounds, &pt); 1518 1518 1519 if (order.points.c == ELEMENTS(order.points.a))1519 if (order.points.c == RT_ELEMENTS(order.points.a)) 1520 1520 { 1521 1521 /* Flush the order and start a new order. */ … … 1538 1538 || ptStart.y != pt.y) 1539 1539 { 1540 VBVA_ASSERT(order.points.c < ELEMENTS(order.points.a));1540 VBVA_ASSERT(order.points.c < RT_ELEMENTS(order.points.a)); 1541 1541 1542 1542 vrdpPolyPointsAdd (&order.points, &ptStart); -
trunk/src/VBox/Additions/WINNT/Graphics/Display/vrdpbmp.c
r8155 r13836 144 144 /* Get the free entry to be used. Try tail, that should be */ 145 145 pEntry = pCache->tail; 146 146 147 147 if (pEntry == NULL) 148 148 { … … 221 221 222 222 pCache->head = &pCache->aEntries[0]; 223 pCache->tail = &pCache->aEntries[ ELEMENTS(pCache->aEntries) - 1];224 225 for (i = 0; i < ELEMENTS(pCache->aEntries); i++)223 pCache->tail = &pCache->aEntries[RT_ELEMENTS(pCache->aEntries) - 1]; 224 225 for (i = 0; i < RT_ELEMENTS(pCache->aEntries); i++) 226 226 { 227 227 VRDPBCENTRY *pEntry = &pCache->aEntries[i]; -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp
r10777 r13836 91 91 { 92 92 int i; 93 for (i = 0; i < ELEMENTS(parameters); i++)93 for (i = 0; i < RT_ELEMENTS(parameters); i++) 94 94 { 95 95 if (parameters[i].level > level) … … 99 99 */ 100 100 Log(("VBoxTray: vboxExperienceSet: Saving %s\n", parameters[i].name)); 101 101 102 102 /* Save the current value. */ 103 103 switch (parameters[i].type) … … 106 106 { 107 107 /* The 2nd parameter is size in characters of the buffer. 108 * The 3rd parameter points to the buffer. 108 * The 3rd parameter points to the buffer. 109 109 */ 110 110 SystemParametersInfo (parameters[i].uActionGet, … … 126 126 case VBOX_SPI_PTR: 127 127 { 128 /* The 3rd parameter points to the structure. 128 /* The 3rd parameter points to the structure. 129 129 * The cbSize member of this structure must be set. 130 130 * The uiParam parameter must alos be set. … … 135 135 break; 136 136 } 137 137 138 138 *(UINT *)¶meters[i].achSavedValue[0] = parameters[i].cbSavedValue; 139 139 140 140 SystemParametersInfo (parameters[i].uActionGet, 141 141 parameters[i].cbSavedValue, … … 147 147 break; 148 148 } 149 149 150 150 Log(("VBoxTray: vboxExperienceSet: Disabling %s\n", parameters[i].name)); 151 151 152 152 /* Disable the feature. */ 153 153 switch (parameters[i].type) … … 199 199 { 200 200 int i; 201 for (i = 0; i < ELEMENTS(parameters); i++)201 for (i = 0; i < RT_ELEMENTS(parameters); i++) 202 202 { 203 203 if (parameters[i].level > level) 204 204 { 205 205 Log(("VBoxTray: vboxExperienceRestore: Restoring %s\n", parameters[i].name)); 206 206 207 207 /* Restore the feature. */ 208 208 switch (parameters[i].type) … … 260 260 uint32_t level; 261 261 BOOL fSavedThemeEnabled; 262 262 263 263 HMODULE hModule; 264 264 … … 280 280 281 281 gCtx.hModule = LoadLibrary("UxTheme"); 282 282 283 283 if (gCtx.hModule) 284 284 { … … 290 290 gCtx.pfnEnableTheming = 0; 291 291 } 292 292 293 293 *pfStartThread = true; 294 294 *ppInstance = &gCtx; … … 318 318 VBoxGuestFilterMaskInfo maskInfo; 319 319 DWORD cbReturned; 320 320 321 321 maskInfo.u32OrMask = VMMDEV_EVENT_VRDP; 322 322 maskInfo.u32NotMask = 0; … … 352 352 /* Call the host to get VRDP status and the experience level. */ 353 353 VMMDevVRDPChangeRequest vrdpChangeRequest = {0}; 354 354 355 355 vrdpChangeRequest.header.size = sizeof(VMMDevVRDPChangeRequest); 356 356 vrdpChangeRequest.header.version = VMMDEV_REQUEST_HEADER_VERSION; … … 358 358 vrdpChangeRequest.u8VRDPActive = 0; 359 359 vrdpChangeRequest.u32VRDPExperienceLevel = 0; 360 360 361 361 if (DeviceIoControl (gVBoxDriver, 362 362 VBOXGUEST_IOCTL_VMMREQUEST(sizeof(VMMDevVRDPChangeRequest)), … … 368 368 { 369 369 Log(("VBoxTray: VBoxVRDPThread: u8VRDPActive = %d, level %d\n", vrdpChangeRequest.u8VRDPActive, vrdpChangeRequest.u32VRDPExperienceLevel)); 370 370 371 371 if (vrdpChangeRequest.u8VRDPActive) 372 372 { 373 373 pCtx->level = vrdpChangeRequest.u32VRDPExperienceLevel; 374 374 vboxExperienceSet (pCtx->level); 375 375 376 376 if (pCtx->level == VRDP_EXPERIENCE_LEVEL_ZERO 377 377 && pCtx->pfnEnableTheming … … 379 379 { 380 380 pCtx->fSavedThemeEnabled = pCtx->pfnIsThemeActive (); 381 381 382 382 Log(("VBoxTray: VBoxVRDPThread: pCtx->fSavedThemeEnabled = %d\n", pCtx->fSavedThemeEnabled)); 383 383 384 384 if (pCtx->fSavedThemeEnabled) 385 385 { … … 402 402 } 403 403 } 404 404 405 405 vboxExperienceRestore (pCtx->level); 406 406 407 407 pCtx->level = VRDP_EXPERIENCE_LEVEL_FULL; 408 408 } … … 420 420 } 421 421 } 422 } 422 } 423 423 else 424 424 {
Note:
See TracChangeset
for help on using the changeset viewer.