vbox的更動 35048 路徑 trunk/src/VBox/Additions/x11
- 時間撮記:
- 2010-12-14 上午12:21:15 (14 年 以前)
- 位置:
- trunk/src/VBox/Additions/x11/vboxvideo
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c
r34871 r35048 215 215 || aRects[i].y2 < pVBox->aScreenLocation[j].y) 216 216 continue; 217 cmdHdr.x = (int16_t)aRects[i].x1 218 - pVBox->aScreenLocation[0].x; 219 cmdHdr.y = (int16_t)aRects[i].y1 220 - pVBox->aScreenLocation[0].y; 217 cmdHdr.x = (int16_t)aRects[i].x1; 218 cmdHdr.y = (int16_t)aRects[i].y1; 221 219 cmdHdr.w = (uint16_t)(aRects[i].x2 - aRects[i].x1); 222 220 cmdHdr.h = (uint16_t)(aRects[i].y2 - aRects[i].y1); -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r34922 r35048 1341 1341 Bool rc = TRUE; 1342 1342 Bool fPrimaryMoved = FALSE; 1343 uint32_t c Primary, cIndex;1343 uint32_t cIndex; 1344 1344 uint32_t cwReal, chReal; 1345 int32_t cxRel, cyRel, cxReal, cyReal, cxOld, cyOld; 1345 uint32_t offStart, offStartReal; 1346 int32_t cxReal, cyReal, cxOld, cyOld; 1346 1347 1347 1348 TRACE_LOG("cDisplay=%u, cWidth=%u, cHeight=%u, x=%d, y=%d, displayWidth=%d\n", … … 1353 1354 pVBox->aScreenLocation[cDisplay].x = x; 1354 1355 pVBox->aScreenLocation[cDisplay].y = y; 1355 cPrimary = vboxGetPrimaryIndex(pScrn);1356 1356 cIndex = vboxGetRealLocationIndex(pScrn, cDisplay); 1357 if (cDisplay == cPrimary && (x != cxOld || y != cyOld))1358 fPrimaryMoved = TRUE;1359 1357 cwReal = pVBox->aScreenLocation[cIndex].cx; 1360 1358 chReal = pVBox->aScreenLocation[cIndex].cy; 1361 1359 cxReal = pVBox->aScreenLocation[cIndex].x; 1362 1360 cyReal = pVBox->aScreenLocation[cIndex].y; 1363 cxRel = cxReal - pVBox->aScreenLocation[cPrimary].x; 1364 cyRel = cyReal - pVBox->aScreenLocation[cPrimary].y; 1361 offStart = cyReal * pVBox->cbLine + cxReal * vboxBPP(pScrn) / 8; 1362 /* Silently fail if the mode - specifically the virtual width - is too 1363 * large for VRAM as we sometimes have to do this - see comments in 1364 * VBOXPreInit. */ 1365 if (offStart + pVBox->cbLine * chReal > pVBox->cbFramebuffer) 1366 return TRUE; 1365 1367 /* Don't fiddle with the hardware if we are switched 1366 1368 * to a virtual terminal. */ 1367 1369 if (!pVBox->vtSwitch) 1368 1370 { 1369 TRACE_LOG("setting mode. cWidth=%u, cHeight=%u, cwReal=%u, chReal=%u, pScrn->virtualX=%d, pScrn->virtualY=%d, vboxBPP(pScrn)=%d, x=%d, y=%d, cDisplay=%u, c Primary=%u, cIndex=%u, cxRel=%d, cyRel=%d, cxReal=%d, cyReal=%d, pVBox->cbLine=%d\n",1371 TRACE_LOG("setting mode. cWidth=%u, cHeight=%u, cwReal=%u, chReal=%u, pScrn->virtualX=%d, pScrn->virtualY=%d, vboxBPP(pScrn)=%d, x=%d, y=%d, cDisplay=%u, cIndex=%u, cxReal=%d, cyReal=%d, pVBox->cbLine=%d\n", 1370 1372 cWidth, cHeight, cwReal, chReal, pScrn->virtualX, 1371 pScrn->virtualY, vboxBPP(pScrn), x, y, cDisplay, cPrimary,1372 cIndex, cxRe l, cyRel, cxReal, cyReal, pVBox->cbLine);1373 pScrn->virtualY, vboxBPP(pScrn), x, y, cDisplay, 1374 cIndex, cxReal, cyReal, pVBox->cbLine); 1373 1375 if (cDisplay == 0) 1374 1376 VBoxVideoSetModeRegisters(cwReal, chReal, pScrn->displayWidth, … … 1381 1383 && (pVBox->fHaveHGSMI) 1382 1384 && !pVBox->vtSwitch) 1383 VBoxHGSMIProcessDisplayInfo(&pVBox->guestCtx, cDisplay, cxRel, cyRel, 1384 cyReal * pVBox->cbLine 1385 + cxReal * vboxBPP(pScrn) / 8, 1386 pVBox->cbLine, 1387 cwReal, chReal, vboxBPP(pScrn)); 1388 /* The guest-host protocol says that first screen is always at offset 1389 * (0,0). Ergo, if the guest changes that offset we need to move all 1390 * other screens in the host to keep the relative positions right. */ 1391 if (fPrimaryMoved) 1392 { 1393 unsigned i; 1394 for (i = 1; i < pVBox->cScreens; ++i) 1395 if (i != cPrimary) 1396 VBOXSetMode(pScrn, i, pVBox->aScreenLocation[i].cx, 1397 pVBox->aScreenLocation[i].cy, 1398 pVBox->aScreenLocation[i].x, 1399 pVBox->aScreenLocation[i].y); 1400 } 1385 VBoxHGSMIProcessDisplayInfo(&pVBox->guestCtx, cDisplay, cxReal, cyReal, 1386 offStart, pVBox->cbLine, cwReal, chReal, 1387 vboxBPP(pScrn)); 1401 1388 TRACE_LOG("returning %s\n", rc ? "TRUE" : "FALSE"); 1402 1389 return rc;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器