static Bool I810_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) { int index = pScrn->pScreen->myNum; I810Ptr pI810 = I810PTR(pScrn); MARKER(); if (!pMode) { /* restore the original mode */ DPRINTF(PFX, "Restoring original mode (from DGA mode)\n"); if (pI810->DGAactive) { pScrn->currentMode = I810SavedDGAModes[index]; pScrn->SwitchMode(index, pScrn->currentMode, 0); pScrn->AdjustFrame(index, 0, 0, 0); pI810->DGAactive = FALSE; } } else { if (!pI810->DGAactive) { DPRINTF(PFX, "Setting DGA mode\n"); I810SavedDGAModes[index] = pScrn->currentMode; pI810->DGAactive = TRUE; } pScrn->SwitchMode(index, pMode->mode, 0); } return TRUE; }
static Bool I810_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) { int index = pScrn->pScreen->myNum; I810Ptr pI810 = I810PTR(pScrn); if (!pMode) { /* restore the original mode */ if (pI810->DGAactive) { pScrn->currentMode = I810SavedDGAModes[index]; pScrn->SwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode)); pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0)); pI810->DGAactive = FALSE; } } else { if (!pI810->DGAactive) { I810SavedDGAModes[index] = pScrn->currentMode; pI810->DGAactive = TRUE; } pScrn->SwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode)); } return TRUE; }