Changeset 20021 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 26, 2009 10:31:44 AM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r19750 r20021 6418 6418 break; 6419 6419 6420 vrc = static_cast <Console *>(console)->getDisplay()->registerSSM(pVM); 6421 AssertRC (vrc); 6422 if (VBOX_FAILURE (vrc)) 6423 break; 6424 6420 6425 /* 6421 6426 * Synchronize debugger settings -
trunk/src/VBox/Main/DisplayImpl.cpp
r19844 r20021 110 110 ///////////////////////////////////////////////////////////////////////////// 111 111 112 #define sSSMDisplayVer 0x00010001 113 114 /** 115 * Save/Load some important guest state 116 */ 117 DECLCALLBACK(void) 118 Display::displaySSMSave (PSSMHANDLE pSSM, void *pvUser) 119 { 120 Display *that = static_cast<Display*>(pvUser); 121 122 int rc = SSMR3PutU32 (pSSM, that->mcMonitors); 123 AssertRC(rc); 124 125 for (unsigned i = 0; i < that->mcMonitors; i++) 126 { 127 rc = SSMR3PutU32 (pSSM, that->maFramebuffers[i].u32Offset); 128 AssertRC(rc); 129 rc = SSMR3PutU32 (pSSM, that->maFramebuffers[i].u32MaxFramebufferSize); 130 AssertRC(rc); 131 rc = SSMR3PutU32 (pSSM, that->maFramebuffers[i].u32InformationSize); 132 AssertRC(rc); 133 } 134 } 135 136 DECLCALLBACK(int) 137 Display::displaySSMLoad (PSSMHANDLE pSSM, void *pvUser, uint32_t u32Version) 138 { 139 Display *that = static_cast<Display*>(pvUser); 140 uint32_t cMonitors; 141 142 if (u32Version != sSSMDisplayVer) 143 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 144 145 int rc = SSMR3GetU32 (pSSM, &cMonitors); 146 if (cMonitors != that->mcMonitors) 147 { 148 LogRel(("Display: Number of monitors changed (%d->%d)!\n", 149 cMonitors, that->mcMonitors)); 150 return VERR_SSM_LOAD_CONFIG_MISMATCH; 151 } 152 153 for (unsigned i = 0; i < cMonitors; i++) 154 { 155 rc = SSMR3GetU32 (pSSM, &that->maFramebuffers[i].u32Offset); 156 AssertRC(rc); 157 rc = SSMR3GetU32 (pSSM, &that->maFramebuffers[i].u32MaxFramebufferSize); 158 AssertRC(rc); 159 rc = SSMR3GetU32 (pSSM, &that->maFramebuffers[i].u32InformationSize); 160 AssertRC(rc); 161 } 162 163 return VINF_SUCCESS; 164 } 165 112 166 /** 113 167 * Initializes the display object. … … 197 251 mpVMMDev = NULL; 198 252 mfVMMDevInited = true; 253 } 254 255 /** 256 * Register the SSM methods. Called by the power up thread to be able to 257 * pass pVM 258 */ 259 int Display::registerSSM(PVM pVM) 260 { 261 return SSMR3RegisterExternal(pVM, "DisplayData", 3*sizeof(uint32_t*), 262 sSSMDisplayVer, 0, 263 NULL, displaySSMSave, NULL, 264 NULL, displaySSMLoad, NULL, this); 199 265 } 200 266 … … 2366 2432 * Init Interfaces. 2367 2433 */ 2368 pDrvIns->IBase.pfnQueryInterface = Display::drvQueryInterface;2369 2370 pData->Connector.pfnResize = Display::displayResizeCallback;2371 pData->Connector.pfnUpdateRect = Display::displayUpdateCallback;2372 pData->Connector.pfnRefresh = Display::displayRefreshCallback;2373 pData->Connector.pfnReset = Display::displayResetCallback;2374 pData->Connector.pfnLFBModeChange = Display::displayLFBModeChangeCallback;2434 pDrvIns->IBase.pfnQueryInterface = Display::drvQueryInterface; 2435 2436 pData->Connector.pfnResize = Display::displayResizeCallback; 2437 pData->Connector.pfnUpdateRect = Display::displayUpdateCallback; 2438 pData->Connector.pfnRefresh = Display::displayRefreshCallback; 2439 pData->Connector.pfnReset = Display::displayResetCallback; 2440 pData->Connector.pfnLFBModeChange = Display::displayLFBModeChangeCallback; 2375 2441 pData->Connector.pfnProcessAdapterData = Display::displayProcessAdapterDataCallback; 2376 2442 pData->Connector.pfnProcessDisplayData = Display::displayProcessDisplayDataCallback; -
trunk/src/VBox/Main/include/DisplayImpl.h
r19844 r20021 114 114 HRESULT init (Console *aParent); 115 115 void uninit(); 116 int registerSSM(PVM pVM); 116 117 117 118 // public methods only for internal purposes … … 275 276 #endif 276 277 278 static DECLCALLBACK(void) displaySSMSave (PSSMHANDLE pSSM, void *pvUser); 279 static DECLCALLBACK(int) displaySSMLoad (PSSMHANDLE pSSM, void *pvUser, uint32_t u32Version); 280 277 281 const ComObjPtr <Console, ComWeakRef> mParent; 278 282 /** Pointer to the associated display driver. */
Note:
See TracChangeset
for help on using the changeset viewer.