- Timestamp:
- Oct 21, 2024 3:23:32 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.cpp
r106568 r106570 69 69 if (m_iValue != iValue) 70 70 { 71 m_iValue = RT_MIN(iValue, m_iMaxVRAM);71 m_iValue = qMin(iValue, m_iMaxVRAM); 72 72 if (m_pSlider) 73 73 m_pSlider->setValue(m_iValue); … … 314 314 return; 315 315 316 /* Init visible maximum VRAM: */ 316 /* Init recommended VRAM according to guest OS type and screen count: */ 317 int iNeedMBytes = UIGuestOSTypeHelpers::requiredVideoMemory(m_strGuestOSTypeId, m_cGuestScreenCount) / _1M; 318 319 /* Init visible maximum VRAM to be no less than 32MB per screen: */ 317 320 int iMaxVRAMVisible = m_cGuestScreenCount * 32; 318 319 /* Get monitors count and recommended VRAM: */320 int iNeedMBytes = UIGuestOSTypeHelpers::requiredVideoMemory(m_strGuestOSTypeId, m_cGuestScreenCount) / _1M;321 322 321 /* Adjust visible maximum VRAM to be no less than 128MB (if possible): */ 323 322 if (iMaxVRAMVisible < 128 && m_iMaxVRAM >= 128) … … 329 328 /* Adjust recommended VRAM to be no less than 128MB: */ 330 329 iNeedMBytes = qMax(iNeedMBytes, 128); 330 331 331 /* Adjust visible maximum VRAM to be no less than 256MB (if possible): */ 332 332 if (iMaxVRAMVisible < 256 && m_iMaxVRAM >= 256) … … 334 334 } 335 335 #endif /* VBOX_WITH_3D_ACCELERATION */ 336 337 /* Adjust recommended VRAM to be no more than actual maximum VRAM: */ 338 iNeedMBytes = qMin(iNeedMBytes, m_iMaxVRAM); 336 339 337 340 /* Adjust visible maximum VRAM to be no less than initial VRAM: */ … … 339 342 /* Adjust visible maximum VRAM to be no less than recommended VRAM: */ 340 343 iMaxVRAMVisible = qMax(iMaxVRAMVisible, iNeedMBytes); 341 342 /* Adjust recommended VRAM to be no more than actual maximum VRAM: */343 iNeedMBytes = qMin(iNeedMBytes, m_iMaxVRAM);344 344 /* Adjust visible maximum VRAM to be no more than actual maximum VRAM: */ 345 345 iMaxVRAMVisible = qMin(iMaxVRAMVisible, m_iMaxVRAM);
Note:
See TracChangeset
for help on using the changeset viewer.