VirtualBox

Changeset 7460 in vbox for trunk


Ignore:
Timestamp:
Mar 14, 2008 2:30:39 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28899
Message:

Frontends/VirtualBox: support VideoModeSupported guest request

Location:
trunk/src/VBox/Frontends
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp

    r7207 r7460  
    194194                                                  ULONG aBPP, BOOL *aSupported)
    195195{
    196     NOREF(aWidth);
    197     NOREF(aHeight);
    198     NOREF(aBPP);
    199196    if (!aSupported)
    200197        return E_POINTER;
    201     /* for now, we swallow everything */
    202198    *aSupported = TRUE;
     199    QRect screen = QApplication::desktop()->screenGeometry (mView);
     200    /* Leave 200 pixels leeway. */
     201    if (aWidth > (ULONG) screen.width() - 200)
     202        *aSupported = FALSE;
     203    if (aHeight > (ULONG) screen.height() - 200)
     204        *aSupported = FALSE;
     205    if (aBPP != 32)
     206        *aSupported = FALSE;
    203207    return S_OK;
    204208}
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp

    r7407 r7460  
    2525/* Qt includes */
    2626#include <QPainter>
     27#include <qdesktopwidget.h>
    2728
    2829//
     
    195196                                                  ULONG aBPP, BOOL *aSupported)
    196197{
    197     NOREF(aWidth);
    198     NOREF(aHeight);
    199     NOREF(aBPP);
    200198    if (!aSupported)
    201199        return E_POINTER;
    202     /* for now, we swallow everything */
    203200    *aSupported = TRUE;
     201    QRect screen = QApplication::desktop()->screenGeometry (mView);
     202    if (aWidth > (ULONG) screen.width())
     203        *aSupported = FALSE;
     204    if (aHeight > (ULONG) screen.height())
     205        *aSupported = FALSE;
     206    if (aBPP != 32)
     207        *aSupported = FALSE;
    204208    return S_OK;
    205209}
Note: See TracChangeset for help on using the changeset viewer.

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