summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordawes <dawes>2000-08-26 00:52:24 +0000
committerdawes <dawes>2000-08-26 00:52:24 +0000
commit46975724c2dd51c419eefd7b4f5e0710bd6d6101 (patch)
tree5e59f0c83429c55e2567f39b2f72cc4eac737c78
parentddc104e8d103d3ccdadae9ec84818a0145c8b61a (diff)
fix a crash when acceleration is disabled
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
index 6c2a46ab5..1750b01d0 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
@@ -2680,13 +2680,19 @@ MGACrtc2FillStrip(ScrnInfoPtr pScrn)
{
MGAPtr pMga = MGAPTR(pScrn);
- xf86SetLastScrnFlag(pScrn->entityList[0], pScrn->scrnIndex);
- pMga->RestoreAccelState(pScrn);
- pMga->SetupForSolidFill(pScrn, 0, GXcopy, 0xFFFFFFFF);
- pMga->SubsequentSolidFillRect(pScrn, pScrn->virtualX, 0,
+ if (pMga->NoAccel) {
+ /* Clears the whole screen, but ... */
+ bzero(pMga->FbStart,
+ pScrn->bitsPerPixel >> 3 * pScrn->displayWidth * pScrn->virtualY);
+ } else {
+ xf86SetLastScrnFlag(pScrn->entityList[0], pScrn->scrnIndex);
+ pMga->RestoreAccelState(pScrn);
+ pMga->SetupForSolidFill(pScrn, 0, GXcopy, 0xFFFFFFFF);
+ pMga->SubsequentSolidFillRect(pScrn, pScrn->virtualX, 0,
pScrn->displayWidth - pScrn->virtualX,
pScrn->virtualY);
- MGAStormSync(pScrn);
+ MGAStormSync(pScrn);
+ }
}