VirtualBox

Changeset 35576 in vbox for trunk/src


Ignore:
Timestamp:
Jan 14, 2011 6:46:03 PM (14 years ago)
Author:
vboxsync
Message:

Main/Display: missing initialisation and saved state bits for X.Org guest multi-monitor extensions

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/DisplayUtils.h

    r32398 r35576  
    2222#define sSSMDisplayVer 0x00010001
    2323#define sSSMDisplayVer2 0x00010002
     24#define sSSMDisplayVer3 0x00010003
    2425
    2526int readSavedGuestSize(const Utf8Str &strStateFilePath, uint32_t u32ScreenId, uint32_t *pu32Width, uint32_t *pu32Height);
  • trunk/src/VBox/Main/src-all/DisplayUtils.cpp

    r35368 r35576  
    164164        {
    165165            /* Only the second version is supported. */
    166             if (uVersion == sSSMDisplayVer2)
     166            if (   uVersion == sSSMDisplayVer2
     167                || uVersion == sSSMDisplayVer3)
    167168            {
    168169                uint32_t cMonitors;
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r35547 r35576  
    350350        SSMR3PutU32(pSSM, that->maFramebuffers[i].w);
    351351        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);
    352355    }
    353356}
     
    359362
    360363    if (!(   uVersion == sSSMDisplayVer
    361           || uVersion == sSSMDisplayVer2))
     364          || uVersion == sSSMDisplayVer2
     365          || uVersion == sSSMDisplayVer3))
    362366        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
    363367    Assert(uPass == SSM_PASS_FINAL); NOREF(uPass);
     
    373377        SSMR3GetU32(pSSM, &that->maFramebuffers[i].u32MaxFramebufferSize);
    374378        SSMR3GetU32(pSSM, &that->maFramebuffers[i].u32InformationSize);
    375         if (uVersion == sSSMDisplayVer2)
     379        if (   uVersion == sSSMDisplayVer2
     380            || uVersion == sSSMDisplayVer3)
    376381        {
    377382            uint32_t w;
     
    381386            that->maFramebuffers[i].w = w;
    382387            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;
    383400        }
    384401    }
     
    429446        maFramebuffers[ul].h = 0;
    430447
     448        maFramebuffers[ul].flags = 0;
     449
    431450        maFramebuffers[ul].u16BitsPerPixel = 0;
    432451        maFramebuffers[ul].pu8FramebufferVRAM = NULL;
     
    504523int Display::registerSSM(PVM pVM)
    505524{
    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),
    509530                                   NULL, NULL, NULL,
    510531                                   NULL, displaySSMSave, NULL,
     
    513534
    514535    /*
    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.
    516538     */
    517539    rc = SSMR3RegisterExternal(pVM, "DisplayData", 12 /*uInstance*/, sSSMDisplayVer, 0 /*cbGuess*/,
Note: See TracChangeset for help on using the changeset viewer.

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