VirtualBox

vbox的更動 8996 路徑 trunk/src/VBox/Devices/VMMDev


忽略:
時間撮記:
2008-5-21 上午08:24:45 (17 年 以前)
作者:
vboxsync
訊息:

VMMDev must return the last acknowledged resolution to the guest.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • 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;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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