static Bool
vncRandRInit(ScreenPtr pScreen)
{
+ rrScrPrivPtr pScrPriv;
RRCrtcPtr crtc;
RRModePtr mode;
Bool ret;
- if (!RRInit())
+ if (!RRScreenInit(pScreen))
return FALSE;
+ pScrPriv = rrGetScrPriv(pScreen);
+
+ pScrPriv->rrGetInfo = vncRandRGetInfo;
+ pScrPriv->rrSetConfig = NULL;
+ pScrPriv->rrScreenSetSize = vncRandRScreenSetSize;
+ pScrPriv->rrCrtcSet = vncRandRCrtcSet;
+ pScrPriv->rrOutputValidateMode = vncRandROutputValidateMode;
+ pScrPriv->rrModeDestroy = vncRandRModeDestroy;
+
/* These are completely arbitrary */
RRScreenSetSizeRange(pScreen, 32, 32, 32768, 32768);
int ret;
void *pbits;
- rrScrPrivPtr rp;
-
/* 96 is the default used by most other systems */
dpi = 96;
if (monitorResolution)
if (!ret)
return FALSE;
+ ret = vncRandRInit(pScreen);
+ if (!ret)
+ return FALSE;
+
/*
* Circumvent the backing store that was just initialised. This amounts
* to a truely bizarre way of initialising SaveDoomedAreas and friends.
pvfb->closeScreen = pScreen->CloseScreen;
pScreen->CloseScreen = vfbCloseScreen;
- ret = RRScreenInit(pScreen);
- if (!ret)
- return FALSE;
-
- rp = rrGetScrPriv(pScreen);
-
- rp->rrGetInfo = vncRandRGetInfo;
- rp->rrSetConfig = NULL;
- rp->rrScreenSetSize = vncRandRScreenSetSize;
- rp->rrCrtcSet = vncRandRCrtcSet;
- rp->rrOutputValidateMode = vncRandROutputValidateMode;
- rp->rrModeDestroy = vncRandRModeDestroy;
-
- ret = vncRandRInit(pScreen);
- if (!ret)
- return FALSE;
-
return TRUE;
} /* end vfbScreenInit */