VirtualBox

Changeset 35931 in vbox


Ignore:
Timestamp:
Feb 10, 2011 5:08:31 PM (14 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: minor adjustments and comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r35882 r35931  
    785785    /* Get our private data from the ScrnInfoRec structure. */
    786786    pVBox = VBOXGetRec(pScrn);
     787    if (!pVBox)
     788        return FALSE;
    787789
    788790    /* Initialise the guest library */
     
    802804
    803805    /* The framebuffer module. */
    804     if (xf86LoadSubModule(pScrn, "fb") == NULL)
     806    if (!xf86LoadSubModule(pScrn, "fb"))
    805807        return (FALSE);
    806808
     
    831833
    832834    pScrn->chipset = "vbox";
     835    /** @note needed during colourmap initialisation */
    833836    pScrn->rgbBits = 8;
    834837
    835     /* Let's create a nice, capable virtual monitor.
    836      * This *is* still needed, at least for server version 1.3 */
     838    /* Let's create a nice, capable virtual monitor. */
    837839    pScrn->monitor = pScrn->confScreen->monitor;
    838840    pScrn->monitor->DDC = NULL;
     
    926928    xf86SetDpi(pScrn, 96, 96);
    927929
    928     /* Framebuffer-related setup */
    929     pScrn->bitmapBitOrder = BITMAP_BIT_ORDER;
     930    if (pScrn->memPhysBase == 0) {
     931#ifdef PCIACCESS
     932        pScrn->memPhysBase = pVBox->pciInfo->regions[0].base_addr;
     933#else
     934        pScrn->memPhysBase = pVBox->pciInfo->memBase[0];
     935#endif
     936        pScrn->fbOffset = 0;
     937    }
    930938
    931939    TRACE_EXIT();
     
    980988        return (FALSE);
    981989
    982     if (pScrn->memPhysBase == 0) {
    983 #ifdef PCIACCESS
    984         pScrn->memPhysBase = pVBox->pciInfo->regions[0].base_addr;
    985 #else
    986         pScrn->memPhysBase = pVBox->pciInfo->memBase[0];
    987 #endif
    988         pScrn->fbOffset = 0;
    989     }
    990 
    991990    if (!VBOXMapVidMem(pScrn))
    992991        return (FALSE);
     
    997996    /* mi layer - reset the visual list (?)*/
    998997    miClearVisualTypes();
    999     if (!xf86SetDefaultVisual(pScrn, -1))
    1000         return (FALSE);
    1001998    if (!miSetVisualTypes(pScrn->depth, TrueColorMask,
    1002999                          pScrn->rgbBits, TrueColor))
     
    10091006#endif
    10101007
    1011     /* I checked in the sources, and XFree86 4.2 does seem to support
    1012        this function for 32bpp. */
    10131008    if (!fbScreenInit(pScreen, pVBox->base,
    10141009                      pScrn->virtualX, pScrn->virtualY,
     
    10181013
    10191014    /* Fixup RGB ordering */
     1015    /** @note the X server uses this even in true colour. */
    10201016    visual = pScreen->visuals + pScreen->numVisuals;
    10211017    while (--visual >= pScreen->visuals) {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette