- Timestamp:
- Aug 10, 2009 7:12:18 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50914
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r21833 r22143 752 752 static QString documentsPath(); 753 753 754 #ifdef VBOX_WITH_VIDEOHWACCEL 755 static bool isAcceleration2DVideoAvailable() {/*TODO: */ return true;} 756 #endif 757 754 758 signals: 755 759 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r22141 r22143 1558 1558 1559 1559 rows += 2; 1560 1561 #ifdef VBOX_WITH_VIDEOHWACCEL 1562 QString acc2dVideo = aMachine.GetAccelerate2DVideoEnabled() 1563 ? tr ("Enabled", "details report (2D Video Acceleration)") 1564 : tr ("Disabled", "details report (2D Video Acceleration)"); 1565 1566 item += QString (sSectionItemTpl2) 1567 .arg (tr ("2D Video Acceleration", "details report"), acc2dVideo); 1568 rows++; 1569 #endif 1560 1570 1561 1571 /* VRDP tab */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsDisplay.cpp
r21194 r22143 95 95 #endif /* QT_MAC_USE_COCOA */ 96 96 97 #ifndef VBOX_WITH_VIDEOHWACCEL 98 mCb2DVideo->setEnabled (false); 99 #endif 100 97 101 /* Applying language settings */ 98 102 retranslateUi(); … … 112 116 mCb3D->setChecked (mMachine.GetAccelerate3DEnabled()); 113 117 118 #ifdef VBOX_WITH_VIDEOHWACCEL 119 bool is2DVideoAccelerationSupported = VBoxGlobal::isAcceleration2DVideoAvailable(); 120 mCb2DVideo->setEnabled (is2DVideoAccelerationSupported); 121 mCb2DVideo->setChecked (mMachine.GetAccelerate2DVideoEnabled()); 122 #else 123 mCb2DVideo->setEnabled (false); 124 #endif 125 114 126 /* VRDP Settings */ 115 127 CVRDPServer vrdp = mMachine.GetVRDPServer(); … … 137 149 mMachine.SetAccelerate3DEnabled (mCb3D->isChecked()); 138 150 151 #ifdef VBOX_WITH_VIDEOHWACCEL 152 /* 2D Video Acceleration */ 153 mMachine.SetAccelerate2DVideoEnabled (mCb2DVideo->isChecked()); 154 #endif 155 139 156 /* VRDP Settings */ 140 157 CVRDPServer vrdp = mMachine.GetVRDPServer(); … … 153 170 connect (mCb3D, SIGNAL (stateChanged (int)), 154 171 mValidator, SLOT (revalidate())); 172 #ifdef VBOX_WITH_VIDEOHWACCEL 173 connect (mCb2DVideo, SIGNAL (stateChanged (int)), 174 mValidator, SLOT (revalidate())); 175 #endif 155 176 connect (mCbVRDP, SIGNAL (toggled (bool)), 156 177 mValidator, SLOT (revalidate())); … … 187 208 setTabOrder (mSlMemory, mLeMemory); 188 209 setTabOrder (mLeMemory, mCb3D); 189 210 #ifdef VBOX_WITH_VIDEOHWACCEL 211 setTabOrder (mCb3D, mCb2DVideo); 212 setTabOrder (mCb2DVideo, mCbVRDP); 213 #else 190 214 setTabOrder (mCb3D, mCbVRDP); 215 #endif 191 216 setTabOrder (mCbVRDP, mLeVRDPPort); 192 217 setTabOrder (mLeVRDPPort, mCbVRDPMethod); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDisplay.ui
r21119 r22143 177 177 </widget> 178 178 </item> 179 <item row="3" column="1" colspan="2"> 180 <widget class="QCheckBox" name="mCb2DVideo"> 181 <property name="sizePolicy"> 182 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 183 <horstretch>0</horstretch> 184 <verstretch>0</verstretch> 185 </sizepolicy> 186 </property> 187 <property name="whatsThis"> 188 <string>When checked, the virtual machine will get access to the Video Acceleration capabilities available on the host.</string> 189 </property> 190 <property name="text"> 191 <string>Enable &2D Video Acceleration</string> 192 </property> 193 </widget> 194 </item> 179 195 </layout> 180 196 </widget> -
trunk/src/VBox/Main/MachineImpl.cpp
r21961 r22143 193 193 mVRAMSize = 8; 194 194 mAccelerate3DEnabled = false; 195 mAccelerate2DVideoEnabled = false; 195 196 mMonitorCount = 1; 196 197 mHWVirtExEnabled = true; … … 226 227 mVRAMSize != that.mVRAMSize || 227 228 mAccelerate3DEnabled != that.mAccelerate3DEnabled || 229 mAccelerate2DVideoEnabled != that.mAccelerate2DVideoEnabled || 228 230 mMonitorCount != that.mMonitorCount || 229 231 mHWVirtExEnabled != that.mHWVirtExEnabled || … … 1186 1188 } 1187 1189 1190 1191 STDMETHODIMP Machine::COMGETTER(Accelerate2DVideoEnabled)(BOOL *enabled) 1192 { 1193 if (!enabled) 1194 return E_POINTER; 1195 1196 AutoCaller autoCaller(this); 1197 CheckComRCReturnRC(autoCaller.rc()); 1198 1199 AutoReadLock alock(this); 1200 1201 *enabled = mHWData->mAccelerate2DVideoEnabled; 1202 1203 return S_OK; 1204 } 1205 1206 STDMETHODIMP Machine::COMSETTER(Accelerate2DVideoEnabled)(BOOL enable) 1207 { 1208 AutoCaller autoCaller(this); 1209 CheckComRCReturnRC(autoCaller.rc()); 1210 1211 AutoWriteLock alock(this); 1212 1213 HRESULT rc = checkStateDependency(MutableStateDep); 1214 CheckComRCReturnRC(rc); 1215 1216 /** @todo check validity! */ 1217 1218 mHWData.backup(); 1219 mHWData->mAccelerate2DVideoEnabled = enable; 1220 1221 return S_OK; 1222 } 1188 1223 1189 1224 STDMETHODIMP Machine::COMGETTER(MonitorCount) (ULONG *monitorCount) … … 5274 5309 mHWData->mMonitorCount = displayNode.value <ULONG> ("monitorCount"); 5275 5310 mHWData->mAccelerate3DEnabled = displayNode.value <bool> ("accelerate3D"); 5311 mHWData->mAccelerate2DVideoEnabled = displayNode.value <bool> ("accelerate2DVideo"); 5276 5312 } 5277 5313 … … 6726 6762 displayNode.setValue <ULONG> ("monitorCount", mHWData->mMonitorCount); 6727 6763 displayNode.setValue <bool> ("accelerate3D", !!mHWData->mAccelerate3DEnabled); 6764 displayNode.setValue <bool> ("accelerate2DVideo", !!mHWData->mAccelerate2DVideoEnabled); 6728 6765 } 6729 6766 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r21970 r22143 4010 4010 <interface 4011 4011 name="IMachine" extends="$unknown" 4012 uuid="5 40dcfda-3df2-49c6-88fa-033a28c2ff85"4012 uuid="5293aa45-5ab5-4f70-852e-bb43f5a46491" 4013 4013 wsmap="managed" 4014 4014 > … … 4223 4223 of the 3D graphics support available on the host. Currently limited 4224 4224 to OpenGL only. </desc> 4225 </attribute> 4226 4227 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false"> 4228 <desc> 4229 This setting determines whether VirtualBox allows guests to make use 4230 of the 2D Video graphics support available on the host. </desc> 4225 4231 </attribute> 4226 4232 -
trunk/src/VBox/Main/include/MachineImpl.h
r21961 r22143 271 271 BOOL mHWVirtExVPIDEnabled; 272 272 BOOL mAccelerate3DEnabled; 273 BOOL mAccelerate2DVideoEnabled; 273 274 BOOL mPAEEnabled; 274 275 ULONG mCPUCount; … … 504 505 STDMETHOD(COMGETTER(Accelerate3DEnabled))(BOOL *enabled); 505 506 STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL enabled); 507 STDMETHOD(COMGETTER(Accelerate2DVideoEnabled))(BOOL *enabled); 508 STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled); 506 509 STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings); 507 510 STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled); -
trunk/src/VBox/Main/include/VirtualBoxXMLUtil.h
r17669 r22143 29 29 30 30 /** VirtualBox XML settings version number substring ("x.y") */ 31 #define VBOX_XML_VERSION "1. 7"31 #define VBOX_XML_VERSION "1.8" 32 32 33 33 /** VirtualBox XML settings version platform substring */ -
trunk/src/VBox/Main/xml/SettingsConverter.xsl
r21447 r22143 141 141 <xsl:attribute name="version"><xsl:value-of select="concat('1.7','-',$curVerPlat)"/></xsl:attribute> 142 142 <xsl:apply-templates select="node()" mode="v1.7"/> 143 </xsl:copy> 144 </xsl:template> 145 146 <!-- 1.7 => 1.8 --> 147 <xsl:template match="/vb:VirtualBox[substring-before(@version,'-')='1.7']"> 148 <xsl:copy> 149 <xsl:attribute name="version"><xsl:value-of select="concat('1.8','-',$curVerPlat)"/></xsl:attribute> 150 <xsl:apply-templates select="node()" mode="v1.8"/> 143 151 </xsl:copy> 144 152 </xsl:template> … … 976 984 <!-- 977 985 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 986 * 1.7 => 1.8 987 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 988 --> 989 <!-- 990 * all non-root elements that are not explicitly matched are copied as is 991 --> 992 <xsl:template match="@*|node()[../..]" mode="v1.8"> 993 <xsl:copy> 994 <xsl:apply-templates select="@*|node()[../..]" mode="v1.8"/> 995 </xsl:copy> 996 </xsl:template> 997 998 <!-- 999 * Global settings 1000 --> 1001 1002 <!-- 1003 * Machine settings 1004 --> 1005 1006 <!--xsl:template match="vb:VirtualBox[substring-before(@version,'-')='1.7']/ 1007 vb:Machine//vb:Hardware/vb:Display" 1008 mode="v1.8"> 1009 <xsl:copy> 1010 <xsl:apply-templates select="node()" mode="v1.8"/> 1011 <xsl:for-each select="@*"> 1012 <xsl:choose> 1013 <xsl:when test="name()='Accelerate2DVideo'"> 1014 <xsl:attribute name="accelerate2DVideo"><xsl:value-of select="."/></xsl:attribute> 1015 </xsl:when> 1016 <xsl:otherwise> 1017 <xsl:apply-templates select="." mode="v1.8"/> 1018 </xsl:otherwise> 1019 </xsl:choose> 1020 </xsl:for-each> 1021 </xsl:copy> 1022 </xsl:template--> 1023 1024 <!-- 1025 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 978 1026 --> 979 1027 -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r19726 r22143 500 500 </xsd:attribute> 501 501 <xsd:attribute name="accelerate3D" type="xsd:boolean" default="false"/> 502 <xsd:attribute name="accelerate2DVideo" type="xsd:boolean" default="false"/> 502 503 </xsd:complexType> 503 504
Note:
See TracChangeset
for help on using the changeset viewer.