VirtualBox

Changeset 3270 in vbox for trunk/src


Ignore:
Timestamp:
Jun 25, 2007 9:42:44 AM (17 years ago)
Author:
vboxsync
Message:

Removed code from the xorg 7 video Additions which uses a function which may not be present in xorg 7.0 and 7.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/xgraphics/vboxvideo_70.c

    r3268 r3270  
    9393static Bool VBOXSaveScreen(ScreenPtr pScreen, int mode);
    9494static Bool VBOXSwitchMode(int scrnIndex, DisplayModePtr pMode, int flags);
    95 static ModeStatus VBOXValidMode(int scrn, DisplayModePtr p, Bool flag, int pass);
    9695static Bool VBOXSetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode);
    9796static void VBOXAdjustFrame(int scrnIndex, int x, int y, int flags);
     
    311310                        pScrn->ScreenInit    = VBOXScreenInit;
    312311                        pScrn->SwitchMode    = VBOXSwitchMode;
    313                         pScrn->ValidMode     = VBOXValidMode;
    314312                        pScrn->AdjustFrame   = VBOXAdjustFrame;
    315313                        pScrn->EnterVT       = VBOXEnterVT;
     
    782780}
    783781
    784 /**
    785  * Quoted from "How to add an (S)VGA driver to XFree86"
    786  * (http://www.xfree86.org/3.3.6/VGADriver.html):
    787  *
    788  * The ValidMode() function is required. It is used to check for any
    789  * chipset-dependent reasons why a graphics mode might not be valid. It gets
    790  * called by higher levels of the code after the Probe() stage. In many cases
    791  * no special checking will be required and this function will simply return
    792  * TRUE always.
    793  *
    794  * Note: we check here that our generated video modes fulfil the X server's
    795  * criteria for the monitor, since this can otherwise cause problems in
    796  * randr 1.2.
    797  */
    798 static ModeStatus
    799 VBOXValidMode(int scrn, DisplayModePtr p, Bool flag, int pass)
    800 {
    801     static int warned = 0;
    802     ScrnInfoPtr pScrn = xf86Screens[scrn];
    803     MonPtr mon = pScrn->monitor;
    804     ModeStatus ret = MODE_BAD;
    805     DisplayModePtr mode;
    806     float v;
    807 
    808     if (pass != MODECHECK_FINAL) {
    809         if (!warned) {
    810             xf86DrvMsg(scrn, X_WARNING, "VBOXValidMode called unexpectedly\n");
    811             warned = 1;
    812         }
    813     }
    814     /*
    815      * First off, if this isn't a mode we handed to the server (ie,
    816      * M_T_BUILTIN), then we reject it out of hand.
    817      */
    818     if (!(p->type & M_T_BUILTIN))
    819         return MODE_NOMODE;
    820     /*
    821      * Finally, walk through the vsync rates 1Hz at a time looking for a mode
    822      * that will fit.  This is assuredly a terrible way to do this, but
    823      * there's no obvious method for computing a mode of a given size that
    824      * will pass xf86CheckModeForMonitor.
    825      */
    826     for (v = mon->vrefresh[0].lo; v <= mon->vrefresh[0].hi; v++) {
    827         mode = xf86CVTMode(p->HDisplay, p->VDisplay, v, 0, 0);
    828         ret = xf86CheckModeForMonitor(mode, mon);
    829         xfree(mode);
    830         if (ret == MODE_OK)
    831             break;
    832     }
    833 
    834     if (ret != MODE_OK)
    835     {
    836         xf86DrvMsg(scrn, X_WARNING, "Graphics mode %s rejected by the X server\n", p->name);
    837     }
    838     return ret;
    839 }
    840 
    841782static Bool
    842783VBOXSwitchMode(int scrnIndex, DisplayModePtr pMode, int flags)
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