VirtualBox

Changeset 50568 in vbox


Ignore:
Timestamp:
Feb 25, 2014 7:11:00 AM (11 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: fix video mode restore if the kernel driver is in use.

File:
1 edited

Legend:

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

    r49877 r50568  
    12431243    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
    12441244    VBOXPtr pVBox = VBOXGetRec(pScrn);
    1245 
     1245#if defined(VBOX_DRI) && !defined(VBOX_DRI_OLD)  /* DRI2 */
     1246    BOOL fRestore = TRUE;
     1247#endif
    12461248    if (pScrn->vtSema)
    12471249    {
     
    12551257    }
    12561258#ifdef VBOX_DRI
     1259# ifndef VBOX_DRI_OLD  /* DRI2 */
     1260    if (   pVBox->drmFD >= 0
     1261        /* Tell the kernel driver, if present, that we are going away. */
     1262        && drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) >= 0)
     1263        fRestore = false;
     1264# endif
    12571265    if (pVBox->useDRI)
    12581266        VBOXDRICloseScreen(pScreen, pVBox);
    12591267    pVBox->useDRI = false;
    1260 # ifndef VBOX_DRI_OLD  /* DRI2 */
    1261     if (   pVBox->drmFD < 0
    1262         /* Tell the kernel driver, if present, that we are going away. */
    1263         || drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) < 0)
    1264 # endif
     1268#endif
     1269#if defined(VBOX_DRI) && !defined(VBOX_DRI_OLD)  /* DRI2 */
     1270    if (fRestore)
    12651271#endif
    12661272        if (pScrn->vtSema)
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