VirtualBox

Changeset 6589 in vbox for trunk


Ignore:
Timestamp:
Jan 30, 2008 8:10:34 AM (17 years ago)
Author:
vboxsync
Message:

Additions/x11: vboxGetDisplayChangeRequest returns bool, not iprt status!

File:
1 edited

Legend:

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

    r6492 r6589  
    4848 */
    4949
    50 #define DEBUG_VERB 2
     50#ifdef DEBUG
    5151
    5252#define TRACE \
     
    6565    xf86Msg(X_INFO, __VA_ARGS__); \
    6666} while(0)
     67
     68#else  /* DEBUG not defined */
     69
     70#define TRACE
     71#define TRACE2
     72#define TRACE3(...)
     73
     74#endif  /* DEBUG not defined */
     75
    6776#ifdef XFree86LOADER
    6877# include "xorg-server.h"
     
    198207    Bool rc = TRUE;
    199208
     209    TRACE3("width=%d, height=%d\n", width, height);
    200210    /* We only support horizontal resolutions which are a multiple of 8.  Round down if
    201211       necessary. */
     
    238248        scrn->displayWidth = width;
    239249    }
     250    TRACE3("returning %d\n", rc);
    240251    return rc;
    241252}
     
    261272
    262273    (void) mode;
     274    TRACE3("name=%s, HDisplay=%d, VDisplay=%d\n", adjusted_mode->name,
     275           adjusted_mode->HDisplay, adjusted_mode->VDisplay);
    263276    /* We only support horizontal resolutions which are a multiple of 8.  Round down if
    264277       necessary. */
     
    282295{
    283296    (void) mode;
     297    TRACE3("name=%s, HDisplay=%d, VDisplay=%d, x=%d, y=%d\n", adjusted_mode->name,
     298           adjusted_mode->HDisplay, adjusted_mode->VDisplay, x, y);
    284299    VBOXSetMode(crtc->scrn, adjusted_mode);
    285300    VBOXAdjustFrame(crtc->scrn->scrnIndex, x, y, 0);
     
    355370                      Bool isPreferred)
    356371{
     372    TRACE3("pszName=%s, x=%d, y=%d\n", pszName, x, y);
    357373    DisplayModePtr pMode = xnfcalloc(1, sizeof(DisplayModeRec));
    358374
     
    381397{
    382398    uint32_t x, y, bpp;
    383     int rc;
     399    bool rc;
    384400    DisplayModePtr pModes = NULL;
    385401    ScrnInfoPtr pScrn = output->scrn;
    386402
     403    TRACE;
    387404    rc = vboxGetDisplayChangeRequest(pScrn, &x, &y, &bpp, 0, 0);
    388     if (RT_SUCCESS(rc) && (0 != x) && (0 != y)) {
     405    if (rc && (0 != x) && (0 != y)) {
    389406        vbox_output_add_mode(&pModes, NULL, x, y, TRUE);
    390407        vbox_output_add_mode(&pModes, "1024x768", 1024, 768, FALSE);
     
    396413        vbox_output_add_mode(&pModes, "640x480", 640, 480, FALSE);
    397414    }
     415    TRACE2;
    398416    return pModes;
    399417}
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