VirtualBox

Ignore:
Timestamp:
Nov 7, 2008 2:53:32 PM (16 years ago)
Author:
vboxsync
Message:

Added Accelerate3D xml setting and IMachine property.

File:
1 edited

Legend:

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

    r13908 r13962  
    192192    mStatisticsUpdateInterval = 0;
    193193    mVRAMSize = 8;
     194    mAccelerate3DEnabled = false;
    194195    mMonitorCount = 1;
    195196    mHWVirtExEnabled = TSBool_False;
     
    222223        mStatisticsUpdateInterval != that.mStatisticsUpdateInterval ||
    223224        mVRAMSize != that.mVRAMSize ||
     225        mAccelerate3DEnabled != that.mAccelerate3DEnabled ||
    224226        mMonitorCount != that.mMonitorCount ||
    225227        mHWVirtExEnabled != that.mHWVirtExEnabled ||
     
    10821084    mHWData.backup();
    10831085    mHWData->mStatisticsUpdateInterval = statisticsUpdateInterval;
     1086
     1087    return S_OK;
     1088}
     1089
     1090
     1091STDMETHODIMP Machine::COMGETTER(Accelerate3DEnabled)(BOOL *enabled)
     1092{
     1093    if (!enabled)
     1094        return E_POINTER;
     1095
     1096    AutoCaller autoCaller (this);
     1097    CheckComRCReturnRC (autoCaller.rc());
     1098
     1099    AutoReadLock alock (this);
     1100
     1101    *enabled = mHWData->mAccelerate3DEnabled;
     1102
     1103    return S_OK;
     1104}
     1105
     1106STDMETHODIMP Machine::COMSETTER(Accelerate3DEnabled)(BOOL enable)
     1107{
     1108    AutoCaller autoCaller (this);
     1109    CheckComRCReturnRC (autoCaller.rc());
     1110
     1111    AutoWriteLock alock (this);
     1112
     1113    HRESULT rc = checkStateDependency (MutableStateDep);
     1114    CheckComRCReturnRC (rc);
     1115
     1116    /** @todo check validity! */
     1117
     1118    mHWData.backup();
     1119    mHWData->mAccelerate3DEnabled = enable;
    10841120
    10851121    return S_OK;
     
    50385074        mHWData->mVRAMSize = displayNode.value <ULONG> ("VRAMSize");
    50395075        mHWData->mMonitorCount = displayNode.value <ULONG> ("MonitorCount");
     5076
     5077        /* Accelerate3DEnabled (optional, default is false) */
     5078        Key Accelerate3DNode = displayNode.findKey ("Accelerate3D");
     5079        if (!Accelerate3DNode.isNull())
     5080            mHWData->mAccelerate3DEnabled = Accelerate3DNode.value <bool> ("enabled");
    50405081    }
    50415082
     
    64056446        displayNode.setValue <ULONG> ("VRAMSize", mHWData->mVRAMSize);
    64066447        displayNode.setValue <ULONG> ("MonitorCount", mHWData->mMonitorCount);
     6448        displayNode.setValue <bool> ("Accelerate3D", mHWData->mAccelerate3DEnabled);
    64076449    }
    64086450
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