VirtualBox

Changeset 81971 in vbox for trunk/src


Ignore:
Timestamp:
Nov 18, 2019 9:35:57 PM (5 years ago)
Author:
vboxsync
Message:

Main/Machine+GraphicsAdapter: previously missed proper removal of settings which are now in a different object

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

Legend:

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

    r81964 r81971  
    276276        ULONG               mMemoryBalloonSize;
    277277        BOOL                mPageFusionEnabled;
    278         GraphicsControllerType_T mGraphicsControllerType;
    279         ULONG               mVRAMSize;
    280278        settings::RecordingSettings mRecordSettings;
    281         ULONG               mMonitorCount;
    282279        BOOL                mHWVirtExEnabled;
    283280        BOOL                mHWVirtExNestedPagingEnabled;
     
    287284        BOOL                mHWVirtExForceEnabled;
    288285        BOOL                mHWVirtExUseNativeApi;
    289         BOOL                mAccelerate2DVideoEnabled;
    290286        BOOL                mPAEEnabled;
    291287        settings::Hardware::LongModeType mLongMode;
     
    307303        uint32_t            mCpuIdPortabilityLevel;
    308304        Utf8Str             mCpuProfile;
    309         BOOL                mAccelerate3DEnabled;
    310305        BOOL                mHPETEnabled;
    311306
     
    495490        IsModified_Snapshots            = 0x0800,
    496491        IsModified_BandwidthControl     = 0x1000,
    497         IsModified_Recording            = 0x2000
     492        IsModified_Recording            = 0x2000,
     493        IsModified_GraphicsAdapter      = 0x4000,
    498494    };
    499495
     
    508504    ChipsetType_T i_getChipsetType() const { return mHWData->mChipsetType; }
    509505    FirmwareType_T i_getFirmwareType() const { return mHWData->mFirmwareType; }
    510     ULONG i_getMonitorCount() const { return mHWData->mMonitorCount; }
    511506    ParavirtProvider_T i_getParavirtProvider() const { return mHWData->mParavirtProvider; }
    512507    Utf8Str i_getParavirtDebug() const { return mHWData->mParavirtDebug; }
  • trunk/src/VBox/Main/src-server/GraphicsAdapterImpl.cpp

    r81970 r81971  
    200200    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    201201
    202     mParent->i_setModified(Machine::IsModified_MachineData);
     202    mParent->i_setModified(Machine::IsModified_GraphicsAdapter);
    203203    mData.backup();
    204204    mData->graphicsControllerType = aGraphicsControllerType;
     
    230230    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    231231
    232     mParent->i_setModified(Machine::IsModified_MachineData);
     232    mParent->i_setModified(Machine::IsModified_GraphicsAdapter);
    233233    mData.backup();
    234234    mData->ulVRAMSizeMB = aVRAMSize;
     
    256256    /** @todo check validity! */
    257257
    258     mParent->i_setModified(Machine::IsModified_MachineData);
     258    mParent->i_setModified(Machine::IsModified_GraphicsAdapter);
    259259    mData.backup();
    260260    mData->fAccelerate3D = !!aAccelerate3DEnabled;
     
    288288    /** @todo check validity! */
    289289
    290     mParent->i_setModified(Machine::IsModified_MachineData);
     290    mParent->i_setModified(Machine::IsModified_GraphicsAdapter);
    291291    mData.backup();
    292292    mData->fAccelerate2DVideo = !!aAccelerate2DVideoEnabled;
     
    318318    if (FAILED(adep.rc())) return adep.rc();
    319319
    320     mParent->i_setModified(Machine::IsModified_MachineData);
     320    mParent->i_setModified(Machine::IsModified_GraphicsAdapter);
    321321    mData.backup();
    322322    mData->cMonitors = aMonitorCount;
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r81964 r81971  
    175175    mMemoryBalloonSize = 0;
    176176    mPageFusionEnabled = false;
    177     mGraphicsControllerType = GraphicsControllerType_VBoxVGA;
    178     mVRAMSize = 8;
    179     mAccelerate3DEnabled = false;
    180     mAccelerate2DVideoEnabled = false;
    181     mMonitorCount = 1;
    182177    mHWVirtExEnabled = true;
    183178    mHWVirtExNestedPagingEnabled = true;
     
    1172411719        mRecordingSettings->i_rollback();
    1172511720
    11726     if (mGraphicsAdapter)
     11721    if (mGraphicsAdapter && (mData->flModifications & IsModified_GraphicsAdapter))
    1172711722        mGraphicsAdapter->i_rollback();
    1172811723
     
    1173011725        mVRDEServer->i_rollback();
    1173111726
    11732     if (mAudioAdapter)
     11727    if (mAudioAdapter && (mData->flModifications & IsModified_AudioAdapter))
    1173311728        mAudioAdapter->i_rollback();
    1173411729
     
    1526515260    if (FAILED(rc)) return rc;
    1526615261
    15267     rc = osType->COMGETTER(RecommendedGraphicsController)(&mHWData->mGraphicsControllerType);
     15262    /* Graphics stuff. */
     15263    GraphicsControllerType_T graphicsController;
     15264    rc = osType->COMGETTER(RecommendedGraphicsController)(&graphicsController);
    1526815265    if (FAILED(rc)) return rc;
    1526915266
    15270     rc = osType->COMGETTER(RecommendedVRAM)(&mHWData->mVRAMSize);
     15267    rc = mGraphicsAdapter->COMSETTER(GraphicsControllerType)(graphicsController);
    1527115268    if (FAILED(rc)) return rc;
    1527215269
    15273     rc = osType->COMGETTER(Recommended2DVideoAcceleration)(&mHWData->mAccelerate2DVideoEnabled);
     15270    ULONG vramSize;
     15271    rc = osType->COMGETTER(RecommendedVRAM)(&vramSize);
    1527415272    if (FAILED(rc)) return rc;
    1527515273
    15276     rc = osType->COMGETTER(Recommended3DAcceleration)(&mHWData->mAccelerate3DEnabled);
     15274    rc = mGraphicsAdapter->COMSETTER(VRAMSize)(vramSize);
     15275    if (FAILED(rc)) return rc;
     15276
     15277    BOOL fAccelerate2DVideoEnabled;
     15278    rc = osType->COMGETTER(Recommended2DVideoAcceleration)(&fAccelerate2DVideoEnabled);
     15279    if (FAILED(rc)) return rc;
     15280
     15281    rc = mGraphicsAdapter->COMSETTER(Accelerate2DVideoEnabled)(fAccelerate2DVideoEnabled);
     15282    if (FAILED(rc)) return rc;
     15283
     15284    BOOL fAccelerate3DEnabled;
     15285    rc = osType->COMGETTER(Recommended3DAcceleration)(&fAccelerate3DEnabled);
     15286    if (FAILED(rc)) return rc;
     15287
     15288    rc = mGraphicsAdapter->COMSETTER(Accelerate3DEnabled)(fAccelerate3DEnabled);
    1527715289    if (FAILED(rc)) return rc;
    1527815290
  • trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp

    r78072 r81971  
    636636int RecordingSettings::i_syncToMachineDisplays(void)
    637637{
     638    AssertPtr(m->pMachine);
     639    ComPtr<IGraphicsAdapter> pGraphicsAdapter;
     640    m->pMachine->COMGETTER(GraphicsAdapter)(pGraphicsAdapter.asOutParam());
     641    ULONG cMonitors = 0;
     642    if (!pGraphicsAdapter.isNull())
     643        pGraphicsAdapter->COMGETTER(MonitorCount)(&cMonitors);
     644
    638645    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    639 
    640     AssertPtr(m->pMachine);
    641     const ULONG cMonitors = m->pMachine->i_getMonitorCount();
    642646
    643647    LogFlowThisFunc(("cMonitors=%RU32\n", cMonitors));
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