VirtualBox

Changeset 26443 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Feb 11, 2010 4:42:07 PM (15 years ago)
Author:
vboxsync
Message:

Fixed loading DisplayScreenshot from saved state (a corrected fix).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r26426 r26443  
    454454     *
    455455     *  Each block is:
    456      *    uint32_t cbBlock;        size of the block in bytes including 'cbBlock' and 'typeOfBlock' fields.
    457      *    uint32_t typeOfBlock;    0 - 32bpp RGB bitmap, 1 - PNG, ignored if no block data.
     456     *    uint32_t cbBlock;        if 0 - no 'block data'.
     457     *    uint32_t typeOfBlock;    0 - 32bpp RGB bitmap, 1 - PNG, ignored if 'cbBlock' is 0.
    458458     *    [block data]
    459459     *
     
    517517        LogFlowFunc(("[%d] type %d, size %d bytes\n", i, typeOfBlock, cbBlock));
    518518
     519        /* Note: displaySSMSaveScreenshot writes size of a block = 8 and
     520         * do not write any data if the image size was 0.
     521         * @todo Fix and increase saved state version.
     522         */
    519523        if (cbBlock > 2 * sizeof (uint32_t))
    520524        {
    521             rc = SSMR3Skip(pSSM, cbBlock - 2 * sizeof (uint32_t));
     525            rc = SSMR3Skip(pSSM, cbBlock);
    522526            AssertRCBreak(rc);
    523527        }
  • trunk/src/VBox/Main/MachineImpl.cpp

    r26440 r26443  
    41424142                    else
    41434143                    {
     4144                        /* displaySSMSaveScreenshot did not write any data, if
     4145                         * cbBlock was == 2 * sizeof (uint32_t).
     4146                         */
    41444147                        if (cbBlock > 2 * sizeof (uint32_t))
    41454148                        {
    4146                             rc = SSMR3Skip(pSSM, cbBlock - 2 * sizeof (uint32_t));
     4149                            rc = SSMR3Skip(pSSM, cbBlock);
    41474150                            AssertRCBreak(rc);
    41484151                        }
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