Changeset 3586 in vbox
- Timestamp:
- Jul 12, 2007 2:38:12 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 22835
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r3585 r3586 136 136 VMMDevReq_GetHeightReduction = 53, 137 137 VMMDevReq_GetDisplayChangeRequest2 = 54, 138 VMMDevReq_ReportGuestCapabilities = 55, 138 139 #ifdef VBOX_HGCM 139 140 VMMDevReq_HGCMConnect = 60, … … 260 261 uint32_t build; 261 262 } VMMDevReqHostVersion; 263 264 /** guest capabilites structure */ 265 typedef struct 266 { 267 /** header */ 268 VMMDevRequestHeader header; 269 /** capabilities (VMMDEV_GUEST_*) */ 270 uint32_t caps; 271 } VMMDevReqGuestCapabilities; 262 272 263 273 /** idle request structure */ … … 1184 1194 case VMMDevReq_GetHeightReduction: 1185 1195 return sizeof(VMMDevGetHeightReductionRequest); 1196 case VMMDevReq_ReportGuestCapabilities: 1197 return sizeof(VMMDevReqGuestCapabilities); 1186 1198 #ifdef VBOX_HGCM 1187 1199 case VMMDevReq_HGCMConnect: -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r3565 r3586 499 499 requestHeader->rc = VERR_VERSION_MISMATCH; 500 500 } 501 } 502 break; 503 } 504 505 /* Report guest capabilities */ 506 case VMMDevReq_ReportGuestCapabilities: 507 { 508 if (requestHeader->size != sizeof(VMMDevReqGuestCapabilities)) 509 { 510 AssertMsgFailed(("VMMDev guest caps structure has invalid size!\n")); 511 requestHeader->rc = VERR_INVALID_PARAMETER; 512 } 513 else 514 { 515 VMMDevReqGuestCapabilities *guestCaps = (VMMDevReqGuestCapabilities*)requestHeader; 516 517 if (pData->guestCaps != guestCaps->caps) 518 { 519 /* make a copy of supplied information */ 520 pData->guestCaps = guestCaps->caps; 521 522 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, guestCaps->caps); 523 } 524 requestHeader->rc = VINF_SUCCESS; 501 525 } 502 526 break; … … 1589 1613 1590 1614 1591 #define VMMDEV_SSM_VERSION 31615 #define VMMDEV_SSM_VERSION 4 1592 1616 1593 1617 /** … … 1618 1642 SSMR3PutU32(pSSMHandle, pData->u32VideoAccelEnabled); 1619 1643 1644 SSMR3PutU32(pSSMHandle, pData->guestCaps); 1645 1620 1646 #ifdef VBOX_HGCM 1621 1647 vmmdevHGCMSaveState (pData, pSSMHandle); … … 1655 1681 SSMR3GetU32(pSSMHandle, &pData->u32VideoAccelEnabled); 1656 1682 1683 SSMR3GetU32(pSSMHandle, &pData->guestCaps); 1684 1657 1685 #ifdef VBOX_HGCM 1658 1686 vmmdevHGCMLoadState (pData, pSSMHandle); … … 1679 1707 pData->pDrv->pfnUpdateGuestVersion(pData->pDrv, &pData->guestInfo); 1680 1708 } 1709 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps); 1681 1710 1682 1711 return VINF_SUCCESS; … … 1912 1941 pData->fu32AdditionsOk = false; 1913 1942 memset (&pData->guestInfo, 0, sizeof (pData->guestInfo)); 1943 pData->guestCaps = 0; 1914 1944 1915 1945 memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest)); -
trunk/src/VBox/Devices/VMMDev/VMMDevState.h
r3379 r3586 96 96 VBoxGuestInfo guestInfo; 97 97 98 /** Information reported by guest via VMMDevReportGuestCapabilities 99 */ 100 uint32_t guestCaps; 101 98 102 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo, 99 103 * if additions version is compatible. This flag is here to avoid repeated comparing
Note:
See TracChangeset
for help on using the changeset viewer.