Пример #1
0
Bool
VidModeGetFirstModeline(int scrnIndex, void **mode, int *dotClock)
{
    ScrnInfoPtr pScrn;
    VidModePtr pVidMode;

    if (!VidModeAvailable(scrnIndex))
        return FALSE;

    pScrn = xf86Screens[scrnIndex];
    if (pScrn->modes == NULL)
        return FALSE;

    pVidMode = VMPTR(pScrn->pScreen);
    pVidMode->First = pScrn->modes;
    pVidMode->Next = pVidMode->First->next;

    if (pVidMode->First->status == MODE_OK) {
        *mode = (void *) (pVidMode->First);
        *dotClock = VidModeGetDotClock(scrnIndex, pVidMode->First->Clock);
        return TRUE;
    }

    return VidModeGetNextModeline(scrnIndex, mode, dotClock);
}
Пример #2
0
int
VidModeGetNumOfModes(int scrnIndex)
{
    void *mode = NULL;
    int dotClock = 0, nummodes = 0;

    if (!VidModeGetFirstModeline(scrnIndex, &mode, &dotClock))
        return nummodes;

    do {
        nummodes++;
        if (!VidModeGetNextModeline(scrnIndex, &mode, &dotClock))
            return nummodes;
    } while (TRUE);
}
Пример #3
0
_X_EXPORT int
VidModeGetNumOfModes(int scrnIndex)
{
    pointer mode = NULL;
    int dotClock= 0, nummodes = 0;
  
    DEBUG_P("VidModeGetNumOfModes");

    if (!VidModeGetFirstModeline(scrnIndex, &mode, &dotClock))
	return nummodes;

    do {
	nummodes++;
	if (!VidModeGetNextModeline(scrnIndex, &mode, &dotClock))
	    return nummodes;
    } while (TRUE);
}
Пример #4
0
_X_EXPORT Bool
VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
{
    ScrnInfoPtr pScrn;
    VidModePtr pVidMode;

    DEBUG_P("VidModeGetFirstModeline");

    if (!VidModeAvailable(scrnIndex))
	return FALSE;

    pScrn = xf86Screens[scrnIndex];
    pVidMode = VMPTR(pScrn->pScreen);
    pVidMode->First = pScrn->modes;
    pVidMode->Next =  pVidMode->First->next;

    if (pVidMode->First->status == MODE_OK) {
      *mode = (pointer)(pVidMode->First);
      *dotClock = VidModeGetDotClock(scrnIndex, pVidMode->First->Clock);
      return TRUE;
    }

    return VidModeGetNextModeline(scrnIndex, mode, dotClock);
}