Changeset 33617 in vbox for trunk/src/VBox
- Timestamp:
- Oct 29, 2010 3:08:08 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67228
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r33599 r33617 583 583 qobject_cast<VBoxVMSettingsDisplay*>(m_pSelector->idToPage(VMSettingsPage_Display)); 584 584 #ifdef VBOX_WITH_CRHGSMI 585 if (pGeneralPage && pDisplayPage && 586 pDisplayPage->isAcceleration3DSelected() && !pGeneralPage->isWddmSupportedForOSType()) 587 { 588 int vramMb = pDisplayPage->getVramSizeMB(); 589 int requiredVramMb = pDisplayPage->getMinVramSizeMBForWddm3D(); 590 if (vramMb < requiredVramMb) 585 if (pGeneralPage && pDisplayPage) 586 { 587 bool bWddmSupported = pGeneralPage->isWddmSupportedForOSType(); 588 pDisplayPage->setWddmMode(bWddmSupported); 589 if (pDisplayPage->isAcceleration3DSelected() && bWddmSupported) 591 590 { 592 strWarning = tr( 593 "you have 3D Acceleration enabled for OS type using the WDDM Video Driver. " 594 "To make 3D work OK please set guest VRAM size to <b>%1</b>." 595 ).arg (vboxGlobal().formatSize (requiredVramMb * _1M, 0, VBoxDefs::FormatSize_RoundUp)); 596 return true; 591 int vramMb = pDisplayPage->getVramSizeMB(); 592 int requiredVramMb = pDisplayPage->getMinVramSizeMBForWddm3D(); 593 if (vramMb < requiredVramMb) 594 { 595 strWarning = tr( 596 "You have 3D Acceleration enabled for a operation system which uses the WDDM video driver. " 597 "For maximal performance set the guest VRAM to at least <b>%1</b>." 598 ).arg (vboxGlobal().formatSize (requiredVramMb * _1M, 0, VBoxDefs::FormatSize_RoundUp)); 599 return true; 600 } 597 601 } 598 602 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp
r33599 r33617 114 114 #endif 115 115 116 #ifdef VBOX_WITH_CRHGSMI 117 m_bWddmMode = false; 118 #endif 119 116 120 /* Applying language settings */ 117 121 retranslateUi(); … … 139 143 { 140 144 return mSlMemory->value(); 145 } 146 147 void VBoxVMSettingsDisplay::setWddmMode(bool bWddm) 148 { 149 if (bWddm == m_bWddmMode) 150 return; 151 152 m_bWddmMode = bWddm; 153 checkMultiMonitorReqs(); 141 154 } 142 155 #endif … … 223 236 #ifdef VBOX_WITH_VIDEOHWACCEL 224 237 connect (mCb2DVideo, SIGNAL (stateChanged (int)), 225 mValidator, SLOT (revalidate()));226 #endif227 #ifdef VBOX_WITH_CRHGSMI228 connect (mCb3D, SIGNAL (stateChanged (int)),229 238 mValidator, SLOT (revalidate())); 230 239 #endif … … 345 354 quint64 needMBytes = VBoxGlobal::requiredVideoMemory (&mMachine, cVal) / _1M; 346 355 /* Limit the maximum memory to save careless users from setting useless big values */ 347 m_maxVRAMVisible = cVal * 32; 348 if (m_maxVRAMVisible < 128) 349 m_maxVRAMVisible = 128; 350 if (m_maxVRAMVisible < m_initialVRAM) 351 m_maxVRAMVisible = m_initialVRAM; 356 #ifdef VBOX_WITH_CRHGSMI 357 if (m_bWddmMode && mCb3D->isChecked()) 358 { 359 m_maxVRAMVisible = 256; 360 } 361 else 362 #endif 363 { 364 m_maxVRAMVisible = cVal * 32; 365 if (m_maxVRAMVisible < 128) 366 m_maxVRAMVisible = 128; 367 if (m_maxVRAMVisible < m_initialVRAM) 368 m_maxVRAMVisible = m_initialVRAM; 369 } 352 370 mSlMemory->setWarningHint (1, needMBytes); 353 371 mSlMemory->setPageStep (calcPageStep (m_maxVRAMVisible)); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.h
r33599 r33617 41 41 int getMinVramSizeMBForWddm3D() const; 42 42 int getVramSizeMB() const; 43 void setWddmMode(bool bWddm); 43 44 #endif 44 45 … … 78 79 /* Initial VRAM value when the dialog is opened. */ 79 80 int m_initialVRAM; 81 #ifdef VBOX_WITH_CRHGSMI 82 /* specifies whether the guest os is wddm-capable */ 83 bool m_bWddmMode; 84 #endif 80 85 }; 81 86 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsGeneral.cpp
r33599 r33617 61 61 62 62 #ifdef VBOX_WITH_CRHGSMI 63 #include <stdio.h> 63 64 bool VBoxVMSettingsGeneral::isWddmSupportedForOSType() const 64 65 { 65 return mOSTypeSelector->type().GetId() == "Windows Vista" 66 || mOSTypeSelector->type().GetId() == "Windows 7"; 66 const QString & id = mOSTypeSelector->type().GetId(); 67 printf("%S\n", id.utf16()); 68 bool bWddm = id == "WindowsVista" || id == "Windows7"; 69 return bWddm; 67 70 } 68 71 #endif
Note:
See TracChangeset
for help on using the changeset viewer.