Changeset 1721 in vbox
- Timestamp:
- Mar 27, 2007 11:46:18 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19878
- Location:
- trunk/src/VBox/Main
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r1681 r1721 4337 4337 BSTR str = NULL; 4338 4338 ULONG cRamMBs; 4339 ULONG cMonitors; 4339 4340 unsigned i; 4340 4341 … … 4737 4738 hrc = pMachine->COMGETTER(VRAMSize)(&cRamMBs); H(); 4738 4739 rc = CFGMR3InsertInteger(pCfg, "VRamSize", cRamMBs * _1M); RC_CHECK(); 4740 hrc = pMachine->COMGETTER(MonitorCount)(&cMonitors); H(); 4741 rc = CFGMR3InsertInteger(pCfg, "MonitorCount", cMonitors); RC_CHECK(); 4739 4742 4740 4743 /* Custom VESA mode list */ … … 5335 5338 break; 5336 5339 } 5337 #endif 5340 #endif 5338 5341 } 5339 5342 } -
trunk/src/VBox/Main/MachineImpl.cpp
r1551 r1721 162 162 mMemorySize = 128; 163 163 mVRAMSize = 8; 164 mMonitorCount = 1; 164 165 mHWVirtExEnabled = TriStateBool_False; 165 166 … … 185 186 if (mMemorySize != that.mMemorySize || 186 187 mVRAMSize != that.mVRAMSize || 188 mMonitorCount != that.mMonitorCount || 187 189 mHWVirtExEnabled != that.mHWVirtExEnabled || 188 190 mClipboardMode != that.mClipboardMode) … … 944 946 mHWData.backup(); 945 947 mHWData->mVRAMSize = memorySize; 948 949 return S_OK; 950 } 951 952 STDMETHODIMP Machine::COMGETTER(MonitorCount) (ULONG *monitorCount) 953 { 954 if (!monitorCount) 955 return E_POINTER; 956 957 AutoCaller autoCaller (this); 958 CheckComRCReturnRC (autoCaller.rc()); 959 960 AutoReaderLock alock (this); 961 962 *monitorCount = mHWData->mMonitorCount; 963 964 return S_OK; 965 } 966 967 STDMETHODIMP Machine::COMSETTER(MonitorCount) (ULONG monitorCount) 968 { 969 /* make sure monitor count is a sensible number */ 970 if (monitorCount < 1 || monitorCount > SchemaDefs::MaxGuestMonitors) 971 return setError (E_INVALIDARG, 972 tr ("Invalid monitor count: %lu (must be in range [%lu, %lu])"), 973 monitorCount, 1, SchemaDefs::MaxGuestMonitors); 974 975 AutoCaller autoCaller (this); 976 CheckComRCReturnRC (autoCaller.rc()); 977 978 AutoLock alock (this); 979 980 CHECK_SETTER(); 981 982 mHWData.backup(); 983 mHWData->mMonitorCount = monitorCount; 946 984 947 985 return S_OK; … … 3544 3582 CFGLDRQueryUInt32 (displayNode, "VRAMSize", &VRAMSize); 3545 3583 mHWData->mVRAMSize = VRAMSize; 3584 3585 uint32_t MonitorCount; 3586 CFGLDRQueryUInt32 (displayNode, "MonitorCount", &MonitorCount); 3587 mHWData->mMonitorCount = MonitorCount; 3588 3546 3589 CFGLDRReleaseNode (displayNode); 3547 3590 } … … 3952 3995 else if (driver == L"coreaudio") 3953 3996 audioDriver = AudioDriverType_CoreAudioDriver; 3954 #endif 3997 #endif 3955 3998 else 3956 3999 AssertMsgFailed (("Invalid driver: %ls\n", driver.raw())); … … 5402 5445 CFGLDRCreateChildNode (aNode, "Display", &displayNode); 5403 5446 CFGLDRSetUInt32 (displayNode, "VRAMSize", mHWData->mVRAMSize); 5447 CFGLDRSetUInt32 (displayNode, "MonitorCount", mHWData->mMonitorCount); 5404 5448 CFGLDRReleaseNode (displayNode); 5405 5449 } … … 5751 5795 break; 5752 5796 } 5753 #endif 5797 #endif 5754 5798 default: 5755 5799 ComAssertMsgFailedBreak (("Wrong audio driver type! driver = %d\n", -
trunk/src/VBox/Main/SystemPropertiesImpl.cpp
r1 r1721 145 145 } 146 146 147 STDMETHODIMP SystemProperties::COMGETTER(MaxGuestMonitors)(ULONG *maxMonitors) 148 { 149 if (!maxMonitors) 150 return E_POINTER; 151 AutoLock lock(this); 152 CHECK_READY(); 153 154 *maxMonitors = SchemaDefs::MaxGuestMonitors; 155 156 return S_OK; 157 } 158 147 159 STDMETHODIMP SystemProperties::COMGETTER(MaxVDISize)(ULONG64 *maxVDISize) 148 160 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r1551 r1721 1936 1936 </attribute> 1937 1937 1938 <attribute name="MonitorCount" type="unsigned long"> 1939 <desc> 1940 Number of virtual monitors. 1941 <note> 1942 Only effective on Windows XP and later guests with 1943 Guest Additions installed. 1944 </note> 1945 </desc> 1946 </attribute> 1947 1938 1948 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes"> 1939 1949 <desc>Object containing all BIOS settings.</desc> -
trunk/src/VBox/Main/include/GuestOSTypeImpl.h
r1 r1721 75 75 uint32_t mVRAMSize; 76 76 uint32_t mHDDSize; 77 uint32_t mMonitorCount; 77 78 }; 78 79 -
trunk/src/VBox/Main/include/MachineImpl.h
r1077 r1721 243 243 ULONG mMemorySize; 244 244 ULONG mVRAMSize; 245 ULONG mMonitorCount; 245 246 TriStateBool_T mHWVirtExEnabled; 246 247 … … 319 320 STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize); 320 321 STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize); 322 STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount); 323 STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount); 321 324 STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings); 322 325 STDMETHOD(COMGETTER(HWVirtExEnabled))(TriStateBool_T *enabled); -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r1 r1721 60 60 STDMETHOD(COMGETTER(MinGuestVRAM)(ULONG *minVRAM)); 61 61 STDMETHOD(COMGETTER(MaxGuestVRAM)(ULONG *maxVRAM)); 62 STDMETHOD(COMGETTER(MaxGuestMonitors)(ULONG *maxMonitors)); 62 63 STDMETHOD(COMGETTER(MaxVDISize)(ULONG64 *maxVDISize)); 63 64 STDMETHOD(COMGETTER(NetworkAdapterCount)(ULONG *count)); -
trunk/src/VBox/Main/xml/SchemaDefs.xsl
r1 r1721 125 125 </xsl:call-template> 126 126 <xsl:call-template name="defineEnumMember"> 127 <xsl:with-param name="member" select="' MaxGuestMonitors'"/> 128 <xsl:with-param name="select" select=" 129 xsd:complexType[@name='TDisplay']/xsd:attribute[@name='MonitorCount']//xsd:maxInclusive/@value 130 "/> 131 </xsl:call-template> 132 <xsl:call-template name="defineEnumMember"> 127 133 <xsl:with-param name="member" select="' NetworkAdapterCount'"/> 128 134 <xsl:with-param name="select" select=" -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r1302 r1721 378 378 </xsd:simpleType> 379 379 </xsd:attribute> 380 <xsd:attribute name="MonitorCount" default="1"> 381 <xsd:simpleType> 382 <xsd:restriction base="xsd:unsignedInt"> 383 <xsd:maxInclusive value="8"/> 384 </xsd:restriction> 385 </xsd:simpleType> 386 </xsd:attribute> 380 387 </xsd:complexType> 381 388
Note:
See TracChangeset
for help on using the changeset viewer.