VirtualBox

Changeset 45661 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 22, 2013 8:45:15 AM (12 years ago)
Author:
vboxsync
Message:

forgotten file

File:
1 edited

Legend:

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

    r45629 r45661  
    162162    mMemoryBalloonSize = 0;
    163163    mPageFusionEnabled = false;
     164    mGraphicsControllerType = GraphicsControllerType_VBoxVGA;
    164165    mVRAMSize = 8;
    165166    mAccelerate3DEnabled = false;
     
    17871788    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    17881789    mHWData->mVideoCaptureHeight = ulVertRes;
     1790    return S_OK;
     1791}
     1792
     1793STDMETHODIMP Machine::COMGETTER(GraphicsControllerType)(GraphicsControllerType_T *aGraphicsControllerType)
     1794{
     1795    CheckComArgOutPointerValid(aGraphicsControllerType);
     1796
     1797    AutoCaller autoCaller(this);
     1798    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1799
     1800    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     1801
     1802    *aGraphicsControllerType = mHWData->mGraphicsControllerType;
     1803
     1804    return S_OK;
     1805}
     1806
     1807STDMETHODIMP Machine::COMSETTER(GraphicsControllerType)(GraphicsControllerType_T aGraphicsControllerType)
     1808{
     1809    switch (aGraphicsControllerType)
     1810    {
     1811        case GraphicsControllerType_VBoxVGA:
     1812            break;
     1813        default:
     1814            return setError(E_INVALIDARG, tr("The graphics controller type (%d) is invalid"), aGraphicsControllerType);
     1815    }
     1816
     1817    AutoCaller autoCaller(this);
     1818    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     1819
     1820    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     1821
     1822    HRESULT rc = checkStateDependency(MutableStateDep);
     1823    if (FAILED(rc)) return rc;
     1824
     1825    setModified(IsModified_MachineData);
     1826    mHWData.backup();
     1827    mHWData->mGraphicsControllerType = aGraphicsControllerType;
     1828
    17891829    return S_OK;
    17901830}
     
    87178757        }
    87188758
     8759        mHWData->mGraphicsControllerType = data.graphicsControllerType;
    87198760        mHWData->mVRAMSize      = data.ulVRAMSizeMB;
    87208761        mHWData->mMonitorCount  = data.cMonitors;
     
    99339974
    99349975        // display
     9976        data.graphicsControllerType = mHWData->mGraphicsControllerType;
    99359977        data.ulVRAMSizeMB = mHWData->mVRAMSize;
    99369978        data.cMonitors = mHWData->mMonitorCount;
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