VirtualBox

Changeset 8996 in vbox


Ignore:
Timestamp:
May 21, 2008 8:24:45 AM (17 years ago)
Author:
vboxsync
Message:

VMMDev must return the last acknowledged resolution to the guest.

File:
1 edited

Legend:

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

    r8690 r8996  
    859859            {
    860860                VMMDevDisplayChangeRequest *displayChangeRequest = (VMMDevDisplayChangeRequest*)pRequestHeader;
     861
     862                if (displayChangeRequest->eventAck == VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST)
     863                {
     864                    /* Remember which resolution the client has queried, subsequent reads will return the same values. */
     865                    pData->lastReadDisplayChangeRequest = pData->displayChangeRequest;
     866                }
     867
    861868                /* just pass on the information */
    862869                Log(("VMMDev: returning display change request xres = %d, yres = %d, bpp = %d\n",
    863870                     pData->displayChangeRequest.xres, pData->displayChangeRequest.yres, pData->displayChangeRequest.bpp));
    864                 displayChangeRequest->xres = pData->displayChangeRequest.xres;
    865                 displayChangeRequest->yres = pData->displayChangeRequest.yres;
    866                 displayChangeRequest->bpp  = pData->displayChangeRequest.bpp;
     871                displayChangeRequest->xres = pData->lastReadDisplayChangeRequest.xres;
     872                displayChangeRequest->yres = pData->lastReadDisplayChangeRequest.yres;
     873                displayChangeRequest->bpp  = pData->lastReadDisplayChangeRequest.bpp;
     874
     875                pRequestHeader->rc = VINF_SUCCESS;
     876            }
     877            break;
     878        }
     879
     880        case VMMDevReq_GetDisplayChangeRequest2:
     881        {
     882            if (pRequestHeader->size != sizeof(VMMDevDisplayChangeRequest2))
     883            {
     884                pRequestHeader->rc = VERR_INVALID_PARAMETER;
     885            }
     886            else
     887            {
     888                VMMDevDisplayChangeRequest2 *displayChangeRequest = (VMMDevDisplayChangeRequest2*)pRequestHeader;
    867889
    868890                if (displayChangeRequest->eventAck == VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST)
    869891                {
    870                     /* Remember which resolution the client has queried. */
     892                    /* Remember which resolution the client has queried, subsequent reads will return the same values. */
    871893                    pData->lastReadDisplayChangeRequest = pData->displayChangeRequest;
    872894                }
    873895
    874                 pRequestHeader->rc = VINF_SUCCESS;
    875             }
    876             break;
    877         }
    878 
    879         case VMMDevReq_GetDisplayChangeRequest2:
    880         {
    881             if (pRequestHeader->size != sizeof(VMMDevDisplayChangeRequest2))
    882             {
    883                 pRequestHeader->rc = VERR_INVALID_PARAMETER;
    884             }
    885             else
    886             {
    887                 VMMDevDisplayChangeRequest2 *displayChangeRequest = (VMMDevDisplayChangeRequest2*)pRequestHeader;
    888896                /* just pass on the information */
    889897                Log(("VMMDev: returning display change request xres = %d, yres = %d, bpp = %d at %d\n",
    890898                     pData->displayChangeRequest.xres, pData->displayChangeRequest.yres, pData->displayChangeRequest.bpp, pData->displayChangeRequest.display));
    891                 displayChangeRequest->xres    = pData->displayChangeRequest.xres;
    892                 displayChangeRequest->yres    = pData->displayChangeRequest.yres;
    893                 displayChangeRequest->bpp     = pData->displayChangeRequest.bpp;
    894                 displayChangeRequest->display = pData->displayChangeRequest.display;
    895 
    896                 if (displayChangeRequest->eventAck == VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST)
    897                 {
    898                     /* Remember which resolution the client has queried. */
    899                     pData->lastReadDisplayChangeRequest = pData->displayChangeRequest;
    900                 }
     899                displayChangeRequest->xres    = pData->lastReadDisplayChangeRequest.xres;
     900                displayChangeRequest->yres    = pData->lastReadDisplayChangeRequest.yres;
     901                displayChangeRequest->bpp     = pData->lastReadDisplayChangeRequest.bpp;
     902                displayChangeRequest->display = pData->lastReadDisplayChangeRequest.display;
    901903
    902904                pRequestHeader->rc = VINF_SUCCESS;
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