- Timestamp:
- Jan 14, 2011 6:46:03 PM (14 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DisplayUtils.h
r32398 r35576 22 22 #define sSSMDisplayVer 0x00010001 23 23 #define sSSMDisplayVer2 0x00010002 24 #define sSSMDisplayVer3 0x00010003 24 25 25 26 int readSavedGuestSize(const Utf8Str &strStateFilePath, uint32_t u32ScreenId, uint32_t *pu32Width, uint32_t *pu32Height); -
trunk/src/VBox/Main/src-all/DisplayUtils.cpp
r35368 r35576 164 164 { 165 165 /* Only the second version is supported. */ 166 if (uVersion == sSSMDisplayVer2) 166 if ( uVersion == sSSMDisplayVer2 167 || uVersion == sSSMDisplayVer3) 167 168 { 168 169 uint32_t cMonitors; -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r35547 r35576 350 350 SSMR3PutU32(pSSM, that->maFramebuffers[i].w); 351 351 SSMR3PutU32(pSSM, that->maFramebuffers[i].h); 352 SSMR3PutS32(pSSM, that->maFramebuffers[i].xOrigin); 353 SSMR3PutS32(pSSM, that->maFramebuffers[i].yOrigin); 354 SSMR3PutU32(pSSM, that->maFramebuffers[i].flags); 352 355 } 353 356 } … … 359 362 360 363 if (!( uVersion == sSSMDisplayVer 361 || uVersion == sSSMDisplayVer2)) 364 || uVersion == sSSMDisplayVer2 365 || uVersion == sSSMDisplayVer3)) 362 366 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 363 367 Assert(uPass == SSM_PASS_FINAL); NOREF(uPass); … … 373 377 SSMR3GetU32(pSSM, &that->maFramebuffers[i].u32MaxFramebufferSize); 374 378 SSMR3GetU32(pSSM, &that->maFramebuffers[i].u32InformationSize); 375 if (uVersion == sSSMDisplayVer2) 379 if ( uVersion == sSSMDisplayVer2 380 || uVersion == sSSMDisplayVer3) 376 381 { 377 382 uint32_t w; … … 381 386 that->maFramebuffers[i].w = w; 382 387 that->maFramebuffers[i].h = h; 388 } 389 if (uVersion == sSSMDisplayVer3) 390 { 391 int32_t xOrigin; 392 int32_t yOrigin; 393 uint32_t flags; 394 SSMR3GetS32(pSSM, &xOrigin); 395 SSMR3GetS32(pSSM, &yOrigin); 396 SSMR3GetU32(pSSM, &flags); 397 that->maFramebuffers[i].xOrigin = xOrigin; 398 that->maFramebuffers[i].yOrigin = yOrigin; 399 that->maFramebuffers[i].flags = (uint16_t)flags; 383 400 } 384 401 } … … 429 446 maFramebuffers[ul].h = 0; 430 447 448 maFramebuffers[ul].flags = 0; 449 431 450 maFramebuffers[ul].u16BitsPerPixel = 0; 432 451 maFramebuffers[ul].pu8FramebufferVRAM = NULL; … … 504 523 int Display::registerSSM(PVM pVM) 505 524 { 506 /* Newest version adds width and height of the framebuffer */ 507 int rc = SSMR3RegisterExternal(pVM, "DisplayData", 0, sSSMDisplayVer2, 508 mcMonitors * sizeof(uint32_t) * 5 + sizeof(uint32_t), 525 /* Version 2 adds width and height of the framebuffer; version 3 adds 526 * the framebuffer offset in the virtual desktop and the framebuffer flags. 527 */ 528 int rc = SSMR3RegisterExternal(pVM, "DisplayData", 0, sSSMDisplayVer3, 529 mcMonitors * sizeof(uint32_t) * 8 + sizeof(uint32_t), 509 530 NULL, NULL, NULL, 510 531 NULL, displaySSMSave, NULL, … … 513 534 514 535 /* 515 * Register loaders for old saved states where iInstance was 3 * sizeof(uint32_t *). 536 * Register loaders for old saved states where iInstance was 537 * 3 * sizeof(uint32_t *) due to a code mistake. 516 538 */ 517 539 rc = SSMR3RegisterExternal(pVM, "DisplayData", 12 /*uInstance*/, sSSMDisplayVer, 0 /*cbGuess*/,
Note:
See TracChangeset
for help on using the changeset viewer.