- Timestamp:
- Oct 22, 2019 4:47:06 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134177
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r79365 r81457 450 450 if (m_machine.isOk()) 451 451 { 452 /* Guest OS type & VT-x/AMD-V option correlation auto-fix: */453 452 UIMachineSettingsGeneral *pGeneralPage = 454 453 qobject_cast<UIMachineSettingsGeneral*>(m_pSelector->idToPage(MachineSettingsPageType_General)); 455 454 UIMachineSettingsSystem *pSystemPage = 456 455 qobject_cast<UIMachineSettingsSystem*>(m_pSelector->idToPage(MachineSettingsPageType_System)); 456 #if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_WITH_3D_ACCELERATION) 457 UIMachineSettingsDisplay *pDisplayPage = 458 qobject_cast<UIMachineSettingsDisplay*>(m_pSelector->idToPage(MachineSettingsPageType_Display)); 459 #endif /* VBOX_WITH_VIDEOHWACCEL || VBOX_WITH_3D_ACCELERATION */ 460 461 /* Guest OS type & VT-x/AMD-V option correlation auto-fix: */ 457 462 if (pGeneralPage && pSystemPage && 458 463 pGeneralPage->is64BitOSTypeSelected() && !pSystemPage->isHWVirtExEnabled()) … … 463 468 if (pGeneralPage && !pGeneralPage->isWindowsOSTypeSelected()) 464 469 { 465 UIMachineSettingsDisplay *pDisplayPage =466 qobject_cast<UIMachineSettingsDisplay*>(m_pSelector->idToPage(MachineSettingsPageType_Display));467 470 if (pDisplayPage && pDisplayPage->isAcceleration2DVideoSelected()) 468 471 m_machine.SetAccelerate2DVideoEnabled(false); 469 472 } 470 473 #endif /* VBOX_WITH_VIDEOHWACCEL */ 474 475 #ifdef VBOX_WITH_3D_ACCELERATION 476 /* Adjust graphics controller type if necessary: */ 477 if ( pDisplayPage 478 && pDisplayPage->isAcceleration3DSelected() 479 && pDisplayPage->graphicsControllerTypeCurrent() != pDisplayPage->graphicsControllerTypeRecommended()) 480 m_machine.SetGraphicsControllerType(pDisplayPage->graphicsControllerTypeRecommended()); 481 #endif /* VBOX_WITH_3D_ACCELERATION */ 471 482 472 483 /* Enable OHCI controller if HID is enabled but no USB controllers present: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r80720 r81457 293 293 , m_f2DVideoAccelerationSupported(false) 294 294 #endif 295 , m_enmGraphicsControllerTypeRecommended(KGraphicsControllerType_Null) 295 296 , m_pCache(0) 296 297 { … … 327 328 m_pVideoMemoryEditor->set2DVideoAccelerationSupported(m_f2DVideoAccelerationSupported); 328 329 #endif 330 /* Acquire recommended graphics controller type: */ 331 m_enmGraphicsControllerTypeRecommended = m_comGuestOSType.GetRecommendedGraphicsController(); 329 332 330 333 /* Revalidate: */ … … 332 335 } 333 336 337 #ifdef VBOX_WITH_3D_ACCELERATION 338 bool UIMachineSettingsDisplay::isAcceleration3DSelected() const 339 { 340 return m_pCheckbox3D->isChecked(); 341 } 342 #endif /* VBOX_WITH_3D_ACCELERATION */ 343 334 344 #ifdef VBOX_WITH_VIDEOHWACCEL 335 345 bool UIMachineSettingsDisplay::isAcceleration2DVideoSelected() const … … 338 348 } 339 349 #endif /* VBOX_WITH_VIDEOHWACCEL */ 350 351 KGraphicsControllerType UIMachineSettingsDisplay::graphicsControllerTypeCurrent() const 352 { 353 return m_pGraphicsControllerEditor->value(); 354 } 340 355 341 356 bool UIMachineSettingsDisplay::changed() const … … 636 651 } 637 652 #endif /* VBOX_WITH_VIDEOHWACCEL */ 653 654 /* Graphics controller type test: */ 655 if (!m_comGuestOSType.isNull()) 656 { 657 if (m_pGraphicsControllerEditor->value() != m_enmGraphicsControllerTypeRecommended) 658 { 659 #ifdef VBOX_WITH_3D_ACCELERATION 660 if (m_pCheckbox3D->isChecked()) 661 message.second << tr("The virtual machine is configured to use 3D acceleration. This will work only if you " 662 "pick a different graphics controller (%1). Either disable 3D acceleration or switch " 663 "to required graphics controller type. The latter will be done automatically if you " 664 "confirm your changes.") 665 .arg(gpConverter->toString(m_enmGraphicsControllerTypeRecommended)); 666 else 667 #endif /* VBOX_WITH_3D_ACCELERATION */ 668 message.second << tr("The virtual machine is configured to use a graphics controller other than the " 669 "recommended one (%1). Please consider switching unless you have a reason to keep the " 670 "currently selected graphics controller.") 671 .arg(gpConverter->toString(m_enmGraphicsControllerTypeRecommended)); 672 } 673 } 638 674 639 675 /* Serialize message: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r80394 r81457 50 50 void setGuestOSType(CGuestOSType comGuestOSType); 51 51 52 #ifdef VBOX_WITH_3D_ACCELERATION 53 /** Returns whether 3D Acceleration is enabled. */ 54 bool isAcceleration3DSelected() const; 55 #endif 52 56 #ifdef VBOX_WITH_VIDEOHWACCEL 53 57 /** Returns whether 2D Video Acceleration is enabled. */ 54 58 bool isAcceleration2DVideoSelected() const; 55 59 #endif 60 61 /** Returns recommended graphics controller type. */ 62 KGraphicsControllerType graphicsControllerTypeRecommended() const { return m_enmGraphicsControllerTypeRecommended; } 63 /** Returns current graphics controller type. */ 64 KGraphicsControllerType graphicsControllerTypeCurrent() const; 56 65 57 66 protected: … … 172 181 bool m_f2DVideoAccelerationSupported; 173 182 #endif 183 /** Holds recommended graphics controller type. */ 184 KGraphicsControllerType m_enmGraphicsControllerTypeRecommended; 174 185 175 186 /** Holds the page data cache instance. */
Note:
See TracChangeset
for help on using the changeset viewer.