VirtualBox

Ignore:
Timestamp:
Jul 14, 2022 8:30:45 AM (2 years ago)
Author:
vboxsync
Message:

Recording: Settings handling fixes / overhaul. This adds the ability to handle per-screen settings, which can be different from the first screen (screen 0). Also fixed a couple of bugs regarding snapshot handling and persistence (committing, rolling back, ++) in that area. FE/VBoxManage now can also list the per-screen settings. Added some further @todos. bugref:9286

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/SnapshotImpl.cpp

    r95476 r95639  
    867867        data.strStateFile.setNull();
    868868
    869     HRESULT rc = m->pMachine->i_saveHardware(data.hardware, &data.debugging, &data.autostart);
    870     if (FAILED(rc)) return rc;
    871 
    872     return S_OK;
     869    return m->pMachine->i_saveHardware(data.hardware, &data.debugging, &data.autostart, data.recordingSettings);
    873870}
    874871
     
    11641161    if (FAILED(rc)) return rc;
    11651162
     1163    unconst(mRecordingSettings).createObject();
     1164    rc = mRecordingSettings->initCopy(this, pMachine->mRecordingSettings);
     1165    if (FAILED(rc)) return rc;
     1166
    11661167    unconst(mTrustedPlatformModule).createObject();
    11671168    rc = mTrustedPlatformModule->initCopy(this, pMachine->mTrustedPlatformModule);
     
    11701171    unconst(mNvramStore).createObject();
    11711172    rc = mNvramStore->initCopy(this, pMachine->mNvramStore);
    1172     if (FAILED(rc)) return rc;
    1173 
    1174     unconst(mRecordingSettings).createObject();
    1175     rc = mRecordingSettings->initCopy(this, pMachine->mRecordingSettings);
    11761173    if (FAILED(rc)) return rc;
    11771174
     
    12471244 *  @param pDbg             debuging settings
    12481245 *  @param pAutostart       autostart settings
     1246 *  @param recording        recording settings
    12491247 *  @param aSnapshotId      snapshot ID of this snapshot machine
    12501248 *  @param aStateFilePath   file where the execution state is saved
     
    12571255                                          const settings::Debugging *pDbg,
    12581256                                          const settings::Autostart *pAutostart,
     1257                                          const settings::RecordingSettings &recording,
    12591258                                          IN_GUID aSnapshotId,
    12601259                                          const Utf8Str &aStateFilePath)
     
    13021301    mBIOSSettings->init(this);
    13031302
     1303    unconst(mRecordingSettings).createObject();
     1304    mRecordingSettings->init(this);
     1305
    13041306    unconst(mTrustedPlatformModule).createObject();
    13051307    mTrustedPlatformModule->init(this);
     
    13081310    mNvramStore->init(this);
    13091311
    1310     unconst(mRecordingSettings).createObject();
    1311     mRecordingSettings->init(this);
    1312 
    13131312    unconst(mGraphicsAdapter).createObject();
    13141313    mGraphicsAdapter->init(this);
     
    13461345
    13471346    /* load hardware and storage settings */
    1348     HRESULT rc = i_loadHardware(NULL, &mSnapshotId, hardware, pDbg, pAutostart);
    1349 
    1350     if (SUCCEEDED(rc))
     1347    HRESULT hrc = i_loadHardware(NULL, &mSnapshotId, hardware, pDbg, pAutostart, recording);
     1348    if (SUCCEEDED(hrc))
    13511349        /* commit all changes made during the initialization */
    13521350        i_commit();   /// @todo r=dj why do we need a commit in init?!? this is very expensive
     
    13551353
    13561354    /* Confirm a successful initialization when it's the case */
    1357     if (SUCCEEDED(rc))
     1355    if (SUCCEEDED(hrc))
    13581356        autoInitSpan.setSucceeded();
    13591357
    13601358    LogFlowThisFuncLeave();
    1361     return rc;
     1359    return hrc;
    13621360}
    13631361
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