VirtualBox

Ignore:
Timestamp:
Mar 13, 2008 3:56:58 PM (17 years ago)
Author:
vboxsync
Message:

Additions/X11: make the X11 drivers work again when the kernel module fails to load

File:
1 edited

Legend:

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

    r7440 r7443  
    315315
    316316Bool
    317 vbox_init(int scrnIndex)
     317vbox_init(int scrnIndex, VBOXPtr pVBox)
    318318{
    319319    Bool rc = TRUE;
     
    321321    if (RT_FAILURE(vrc))
    322322    {
    323         xf86DrvMsg(scrnIndex, X_ERROR, "VbglR3Init failed rc=%d.\n", rc);
     323        xf86DrvMsg(scrnIndex, X_ERROR,
     324                   "Failed to initialize the VirtualBox device (rc=%d) - make sure that the VirtualBox guest additions are properly installed.  If you are not sure, try reinstalling them.  The X Window graphics drivers will run in compatibility mode.\n",
     325                   vrc);
    324326        rc = FALSE;
    325327    }
     328    pVBox->useDevice = rc;
    326329    return rc;
    327330}
     
    337340    TRACE_ENTRY();
    338341
     342    if (!pVBox->useDevice)
     343        return FALSE;
    339344    pVBox->useVbva = FALSE;
    340345
     
    733738    Bool rc;
    734739
     740    if (!pVBox->useDevice)
     741        return FALSE;
    735742    pVBox->pCurs = pCurs = xf86CreateCursorInfoRec();
    736743    if (!pCurs)
     
    830837 */
    831838Bool
    832 vboxEnableGraphicsCap(void)
    833 {
     839vboxEnableGraphicsCap(VBOXPtr pVBox)
     840{
     841    if (!pVBox->useDevice)
     842        return FALSE;
    834843    return RT_SUCCESS(VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0));
    835844}
     
    842851 */
    843852Bool
    844 vboxDisableGraphicsCap(void)
    845 {
     853vboxDisableGraphicsCap(VBOXPtr pVBox)
     854{
     855    if (!pVBox->useDevice)
     856        return FALSE;
    846857    return RT_SUCCESS(VbglR3SetGuestCaps(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS));
    847858}
     
    860871Bool
    861872vboxGetDisplayChangeRequest(ScrnInfoPtr pScrn, uint32_t *pcx, uint32_t *pcy,
    862                             uint32_t *pcBits, uint32_t *piDisplay)
    863 {
     873                            uint32_t *pcBits, uint32_t *piDisplay,
     874                            VBOXPtr pVBox)
     875{
     876    if (!pVBox->useDevice)
     877        return FALSE;
    864878    int rc = VbglR3GetLastDisplayChangeRequest(pcx, pcy, pcBits, piDisplay);
    865879    if (RT_SUCCESS(rc))
     
    868882    return FALSE;
    869883}
    870 
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