VirtualBox

Ignore:
Timestamp:
Jun 14, 2007 4:18:18 PM (18 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r2981 r3110  
    773773        }
    774774
     775        case VMMDevReq_GetDisplayChangeRequest2:
     776        {
     777            if (requestHeader->size != sizeof(VMMDevDisplayChangeRequest2))
     778            {
     779                requestHeader->rc = VERR_INVALID_PARAMETER;
     780            }
     781            else
     782            {
     783                VMMDevDisplayChangeRequest2 *displayChangeRequest = (VMMDevDisplayChangeRequest2*)requestHeader;
     784                /* just pass on the information */
     785                Log(("VMMDev: returning display change request xres = %d, yres = %d, bpp = %d at %d\n",
     786                     pData->displayChangeRequest.xres, pData->displayChangeRequest.yres, pData->displayChangeRequest.bpp, pData->displayChangeRequest.display));
     787                displayChangeRequest->xres    = pData->displayChangeRequest.xres;
     788                displayChangeRequest->yres    = pData->displayChangeRequest.yres;
     789                displayChangeRequest->bpp     = pData->displayChangeRequest.bpp;
     790                displayChangeRequest->display = pData->displayChangeRequest.display;
     791
     792                if (displayChangeRequest->eventAck == VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST)
     793                {
     794                    /* Remember which resolution the client have queried. */
     795                    pData->lastReadDisplayChangeRequest = pData->displayChangeRequest;
     796                }
     797
     798                requestHeader->rc = VINF_SUCCESS;
     799            }
     800            break;
     801        }
     802
    775803        /*
    776804         * Query whether the given video mode is supported
     
    13741402
    13751403
    1376 static DECLCALLBACK(int) vmmdevRequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t xres, uint32_t yres, uint32_t bpp)
     1404static DECLCALLBACK(int) vmmdevRequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t xres, uint32_t yres, uint32_t bpp, uint32_t display)
    13771405{
    13781406    VMMDevState *pData = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     
    13811409    bool fSameResolution = (!xres || (pData->lastReadDisplayChangeRequest.xres == xres)) &&
    13821410                           (!yres || (pData->lastReadDisplayChangeRequest.yres == yres)) &&
    1383                            (!bpp || (pData->lastReadDisplayChangeRequest.bpp == bpp));
     1411                           (!bpp || (pData->lastReadDisplayChangeRequest.bpp == bpp)) &&
     1412                           pData->lastReadDisplayChangeRequest.display == display;
    13841413
    13851414    if (!xres && !yres && !bpp)
     
    13901419
    13911420#ifdef DEBUG_sunlover
    1392     Log(("vmmdevRequestDisplayChange: same=%d. new: xres=%d, yres=%d, bpp=%d. old: xres=%d, yres=%d, bpp=%d.\n",
    1393           fSameResolution, xres, yres, bpp, pData->lastReadDisplayChangeRequest.xres, pData->lastReadDisplayChangeRequest.yres, pData->lastReadDisplayChangeRequest.bpp));
     1421    Log(("vmmdevRequestDisplayChange: same=%d. new: xres=%d, yres=%d, bpp=%d, display=%d. old: xres=%d, yres=%d, bpp=%d, display=%d.\n",
     1422          fSameResolution, xres, yres, bpp, display, pData->lastReadDisplayChangeRequest.xres, pData->lastReadDisplayChangeRequest.yres, pData->lastReadDisplayChangeRequest.bpp, pData->lastReadDisplayChangeRequest.display));
    13941423#endif /* DEBUG_sunlover */
    13951424
    13961425    if (!fSameResolution)
    13971426    {
    1398         LogRel(("VMMDev::SetVideoModeHint: got a video mode hint (%dx%dx%d)\n",
    1399                 xres, yres, bpp));
     1427        LogRel(("VMMDev::SetVideoModeHint: got a video mode hint (%dx%dx%d) at %d\n",
     1428                xres, yres, bpp, display));
    14001429
    14011430        /* we could validate the information here but hey, the guest can do that as well! */
    1402         pData->displayChangeRequest.xres = xres;
    1403         pData->displayChangeRequest.yres = yres;
    1404         pData->displayChangeRequest.bpp  = bpp;
     1431        pData->displayChangeRequest.xres    = xres;
     1432        pData->displayChangeRequest.yres    = yres;
     1433        pData->displayChangeRequest.bpp     = bpp;
     1434        pData->displayChangeRequest.display = display;
    14051435
    14061436        /* IRQ so the guest knows what's going on */
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