VirtualBox

Changeset 3110 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 14, 2007 4:18:18 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
21993
Message:

Added the display index parameter to the SetVideoModeHint (in the guest all hints are still processed only for the primary monitor).

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r2981 r3110  
    13341334}
    13351335
    1336 STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aColorDepth)
     1336STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aColorDepth, ULONG aDisplay)
    13371337{
    13381338    AutoLock lock(this);
     
    13581358        bpp = cBits;
    13591359    }
    1360     ULONG vramSize;
    1361     mParent->machine()->COMGETTER(VRAMSize)(&vramSize);
    1362     /* enough VRAM? */
    1363     if ((width * height * (bpp / 8)) > (vramSize * 1024 * 1024))
    1364         return setError(E_FAIL, tr("Not enough VRAM for the selected video mode"));
     1360    ULONG cMonitors;
     1361    mParent->machine()->COMGETTER(MonitorCount)(&cMonitors);
     1362    if (cMonitors == 0 && aDisplay > 0)
     1363        return E_INVALIDARG;
     1364    if (aDisplay >= cMonitors)
     1365        return E_INVALIDARG;
     1366
     1367// sunlover 20070614: It is up to the guest to decide whether the hint is valid.
     1368//    ULONG vramSize;
     1369//    mParent->machine()->COMGETTER(VRAMSize)(&vramSize);
     1370//    /* enough VRAM? */
     1371//    if ((width * height * (bpp / 8)) > (vramSize * 1024 * 1024))
     1372//        return setError(E_FAIL, tr("Not enough VRAM for the selected video mode"));
    13651373
    13661374    if (mParent->getVMMDev())
    1367         mParent->getVMMDev()->getVMMDevPort()->pfnRequestDisplayChange(mParent->getVMMDev()->getVMMDevPort(), aWidth, aHeight, aColorDepth);
     1375        mParent->getVMMDev()->getVMMDevPort()->pfnRequestDisplayChange(mParent->getVMMDev()->getVMMDevPort(), aWidth, aHeight, aColorDepth, aDisplay);
    13681376    return S_OK;
    13691377}
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r3001 r3110  
    62986298    <interface
    62996299        name="IDisplay" extends="$unknown"
    6300         uuid="FD443EC1-0012-4F5B-9282-D72760A66916"
     6300        uuid="0a6a7746-5469-47e4-9a00-8b1ea28891b8"
    63016301        wsmap="suppress"
    63026302    >
     
    63536353                Specifying "0" for either width and height or the color depth
    63546354                means that the dimensions or color depth should not be changed.
     6355                It is possible to specify the number of the guest display
     6356                that has to be resized, if guest supports multimonitor configuration.
     6357                The display value 0 means primary display, 1 - first secondary.
    63556358            </desc>
    63566359            <param name="width" type="unsigned long" dir="in"/>
    63576360            <param name="height" type="unsigned long" dir="in"/>
    63586361            <param name="colorDepth" type="unsigned long" dir="in"/>
     6362            <param name="display" type="unsigned long" dir="in"/>
    63596363        </method>
    63606364
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r3001 r3110  
    138138    STDMETHOD(UnlockFramebuffer)();
    139139    STDMETHOD(RegisterExternalFramebuffer)(IFramebuffer *frameBuf);
    140     STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG colorDepth);
     140    STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG colorDepth, ULONG display);
    141141    STDMETHOD(TakeScreenShot)(BYTE *address, ULONG width, ULONG height);
    142142    STDMETHOD(DrawToScreen)(BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height);
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