VirtualBox

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


Ignore:
Timestamp:
Apr 13, 2010 4:01:51 PM (15 years ago)
Author:
vboxsync
Message:

VideoModeSupported for multimonitor. (xTracker 4655)

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

Legend:

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

    r28256 r28264  
    20992099
    21002100    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     2101
     2102    if (aScreenId != 0 && aScreenId >= mcMonitors)
     2103        return E_INVALIDARG;
    21012104
    21022105    /* @todo this should be actually done on EMT. */
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r28051 r28264  
    319319}
    320320
    321 DECLCALLBACK(int) vmmdevVideoModeSupported(PPDMIVMMDEVCONNECTOR pInterface, uint32_t width, uint32_t height,
     321DECLCALLBACK(int) vmmdevVideoModeSupported(PPDMIVMMDEVCONNECTOR pInterface, uint32_t display, uint32_t width, uint32_t height,
    322322                                           uint32_t bpp, bool *fSupported)
    323323{
     
    326326    if (!fSupported)
    327327        return VERR_INVALID_PARAMETER;
    328     IFramebuffer *framebuffer = pDrv->pVMMDev->getParent()->getDisplay()->getFramebuffer();
    329     if (framebuffer)
     328#ifdef DEBUG_sunlover
     329    Log(("vmmdevVideoModeSupported: [%d]: %dx%dx%d\n", display, width, height, bpp));
     330#endif
     331    IFramebuffer *framebuffer = NULL;
     332    LONG xOrigin = 0;
     333    LONG yOrigin = 0;
     334    HRESULT hrc = pDrv->pVMMDev->getParent()->getDisplay()->GetFramebuffer(display, &framebuffer, &xOrigin, &yOrigin);
     335    if (SUCCEEDED(hrc) && framebuffer)
     336    {
    330337        framebuffer->VideoModeSupported(width, height, bpp, (BOOL*)fSupported);
     338        framebuffer->Release();
     339    }
    331340    else
     341    {
     342#ifdef DEBUG_sunlover
     343        Log(("vmmdevVideoModeSupported: hrc %x, framebuffer %p!!!\n", hrc, framebuffer));
     344#endif
    332345        *fSupported = true;
     346    }
    333347    return VINF_SUCCESS;
    334348}
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