Changeset 35266 in vbox
- Timestamp:
- Dec 20, 2010 9:00:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r35207 r35266 58 58 #include "product-generated.h" 59 59 #include <xf86.h> 60 #include <misc.h> 60 61 61 62 /* All drivers initialising the SW cursor need this */ … … 1288 1289 * too large for VRAM as we sometimes have to do this - see comments in 1289 1290 * VBOXPreInit. */ 1290 if (offStart + pVBox->cbLine * cHeight > pVBox->cbFramebuffer) 1291 if ( offStart + pVBox->cbLine * cHeight > pVBox->cbFramebuffer 1292 || pVBox->cbLine * pScrn->virtualY > pVBox->cbFramebuffer) 1291 1293 fActive = FALSE; 1292 1294 /* Deactivate the screen if it is outside of the virtual framebuffer and … … 1327 1329 VBOXPtr pVBox = VBOXGetRec(pScrn); 1328 1330 uint64_t cbLine = vboxLineLength(pScrn, width); 1331 uint32_t cbOldPixmap; 1329 1332 1330 1333 TRACE_LOG("width=%d, height=%d\n", width, height); … … 1344 1347 pScrn->depth, vboxBPP(pScrn), cbLine, 1345 1348 pVBox->base); 1349 cbOldPixmap = pVBox->cbLine * pScrn->virtualY; 1350 if (cbOldPixmap > pVBox->cbFramebuffer) 1351 cbOldPixmap = 0; 1346 1352 pScrn->virtualX = width; 1347 1353 pScrn->virtualY = height; 1348 1354 pScrn->displayWidth = vboxDisplayPitch(pScrn, cbLine); 1349 1355 pVBox->cbLine = cbLine; 1356 /* Clear video RAM for esthetic reasons */ 1357 memset(pVBox->base, 0, max(cbLine * height, cbOldPixmap)); 1350 1358 #ifdef VBOX_DRI 1351 1359 if (pVBox->useDRI)
Note:
See TracChangeset
for help on using the changeset viewer.