Changeset 8312 in vbox for trunk/src/VBox
- Timestamp:
- Apr 22, 2008 9:04:44 PM (17 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r8155 r8312 572 572 573 573 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps); 574 pRequestHeader->rc = VINF_SUCCESS; 575 } 576 break; 577 } 578 579 case VMMDevReq_SetMaxGuestResolution: 580 { 581 if (pRequestHeader->size != sizeof(VMMDevReqGuestResolution)) 582 { 583 AssertMsgFailed(("VMMDev guest resolution structure has invalid size!\n")); 584 pRequestHeader->rc = VERR_INVALID_PARAMETER; 585 } 586 else 587 { 588 VMMDevReqGuestResolution *guestRes = (VMMDevReqGuestResolution*)pRequestHeader; 589 590 pData->u32MaxGuestWidth = guestRes->u32MaxWidth; 591 pData->u32MaxGuestHeight = guestRes->u32MaxHeight; 592 593 LogRel(("Guest Additions maximum resolution of %dx%d reported\n", 594 pData->u32MaxGuestWidth, pData->u32MaxGuestHeight)); 595 596 /* Only notify frontends that are interested (i.e. Main, but not BFE) */ 597 if (NULL != pData->pDrv->pfnUpdateMaxGuestResolution) 598 pData->pDrv->pfnUpdateMaxGuestResolution(pData->pDrv, pData->u32MaxGuestWidth, pData->u32MaxGuestHeight); 574 599 pRequestHeader->rc = VINF_SUCCESS; 575 600 } … … 1947 1972 1948 1973 1949 #define VMMDEV_SSM_VERSION 61974 #define VMMDEV_SSM_VERSION 7 1950 1975 1951 1976 /** … … 1978 2003 SSMR3PutU32(pSSMHandle, pData->guestCaps); 1979 2004 2005 SSMR3PutU32(pSSMHandle, pData->u32MaxGuestWidth); 2006 SSMR3PutU32(pSSMHandle, pData->u32MaxGuestHeight); 2007 1980 2008 #ifdef VBOX_HGCM 1981 2009 vmmdevHGCMSaveState (pData, pSSMHandle); … … 2017 2045 SSMR3GetU32(pSSMHandle, &pData->guestCaps); 2018 2046 2047 SSMR3GetU32(pSSMHandle, &pData->u32MaxGuestWidth); 2048 SSMR3GetU32(pSSMHandle, &pData->u32MaxGuestHeight); 2049 2019 2050 #ifdef VBOX_HGCM 2020 2051 vmmdevHGCMLoadState (pData, pSSMHandle); … … 2046 2077 if (pData->pDrv) 2047 2078 pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps); 2079 2080 if ( pData->pDrv && pData->pDrv->pfnUpdateMaxGuestResolution) 2081 pData->pDrv->pfnUpdateMaxGuestResolution(pData->pDrv, pData->u32MaxGuestWidth, pData->u32MaxGuestHeight); 2048 2082 2049 2083 return VINF_SUCCESS; … … 2319 2353 pData->fu32AdditionsOk = false; 2320 2354 memset (&pData->guestInfo, 0, sizeof (pData->guestInfo)); 2355 2356 /* No maximum resolution specified yet */ 2357 pData->u32MaxGuestWidth = 0; 2358 pData->u32MaxGuestHeight = 0; 2321 2359 2322 2360 memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest)); -
trunk/src/VBox/Devices/VMMDev/VMMDevState.h
r8155 r8312 108 108 uint32_t u32VideoAccelEnabled; 109 109 110 /** Maximum guest resolution, width - a value of 0 mean no maximum */ 111 uint32_t u32MaxGuestWidth; 112 /** Maximum guest resolution, height - a value of 0 mean no maximum */ 113 uint32_t u32MaxGuestHeight; 114 110 115 /** resolution change request */ 111 116 struct -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r8155 r8312 421 421 pData->Connector.pfnUpdateGuestVersion = VMMDev::UpdateGuestVersion; 422 422 pData->Connector.pfnUpdateGuestCapabilities = VMMDev::UpdateGuestCapabilities; 423 pData->Connector.pfnUpdateMaxGuestResolution = NULL; 423 424 pData->Connector.pfnUpdateMouseCapabilities = VMMDev::UpdateMouseCapabilities; 424 425 pData->Connector.pfnUpdatePointerShape = VMMDev::UpdatePointerShape; -
trunk/src/VBox/Main/GuestImpl.cpp
r8155 r8312 337 337 } 338 338 339 void Guest::setMaxGuestResolution (ULONG aMaxWidth, ULONG aMaxHeight) 340 { 341 AutoCaller autoCaller (this); 342 AssertComRCReturnVoid (autoCaller.rc()); 343 344 AutoWriteLock alock (this); 345 346 mData.mMaxWidth = aMaxWidth; 347 mData.mMaxHeight = aMaxHeight; 348 } 349 339 350 void Guest::setSupportsSeamless (BOOL aSupportsSeamless) 340 351 { -
trunk/src/VBox/Main/VMMDevInterface.cpp
r8155 r8312 215 215 pDrv->pVMMDev->getParent()->onAdditionsStateChange(); 216 216 217 } 218 219 /** 220 * Update the maximum guest resolution. 221 * This is called when the guest sends us a corresponding notification. The new resolution 222 * is given and the connector should update its internal state. 223 * @note This member can be left null if the connector is not interested in the 224 * notification. 225 * 226 * @param pInterface Pointer to this interface. 227 * @param u32MaxWidth New width. 228 * @param u32MaxHeight New Height. 229 * @thread The emulation thread. 230 */ 231 DECLCALLBACK(void) vmmdevUpdateMaxGuestResolution(PPDMIVMMDEVCONNECTOR pInterface, uint32_t u32MaxWidth, uint32_t u32MaxHeight) 232 { 233 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 234 235 /* store that information in IGuest */ 236 Guest* guest = pDrv->pVMMDev->getParent()->getGuest(); 237 Assert(guest); 238 if (!guest) 239 return; 240 241 guest->setMaxGuestResolution(u32MaxWidth, u32MaxHeight); 242 243 /* This information is queried when it is needed, so there is no need to 244 issue any further notifications. */ 217 245 } 218 246 … … 677 705 pData->Connector.pfnUpdateGuestVersion = vmmdevUpdateGuestVersion; 678 706 pData->Connector.pfnUpdateGuestCapabilities = vmmdevUpdateGuestCapabilities; 707 pData->Connector.pfnUpdateMaxGuestResolution = vmmdevUpdateMaxGuestResolution; 679 708 pData->Connector.pfnUpdateMouseCapabilities = vmmdevUpdateMouseCapabilities; 680 709 pData->Connector.pfnUpdatePointerShape = vmmdevUpdatePointerShape; -
trunk/src/VBox/Main/include/GuestImpl.h
r8155 r8312 76 76 void setAdditionsVersion (Bstr aVersion); 77 77 78 void setMaxGuestResolution (ULONG aMaxWidth, ULONG aMaxHeight); 79 78 80 void setSupportsSeamless (BOOL aSupportsSeamless); 79 81 … … 89 91 struct Data 90 92 { 91 Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE), 93 Data() : mAdditionsActive (FALSE), mMaxWidth (0), 94 mMaxHeight(0), mSupportsSeamless (FALSE), 92 95 /* Windows and OS/2 guests take this for granted */ 93 96 mSupportsGraphics (TRUE) {} … … 96 99 BOOL mAdditionsActive; 97 100 Bstr mAdditionsVersion; 101 /** The maximum width supported by the guest - zero means no maximum */ 102 ULONG mMaxWidth; 103 /** The maximum height supported by the guest - zero means no maximum */ 104 ULONG mMaxHeight; 98 105 BOOL mSupportsSeamless; 99 106 BOOL mSupportsGraphics;
Note:
See TracChangeset
for help on using the changeset viewer.