VirtualBox

Changeset 106810 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 31, 2024 2:41:09 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165711
Message:

FE/Qt: bugref:10767: VM settings / Display page: Make sure 3D acceleration check-box is enabled/disabled if supported or not by guest OS type.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r106149 r106810  
    304304    : m_strGuestOSTypeId(QString())
    305305#ifdef VBOX_WITH_3D_ACCELERATION
    306     , m_fWddmModeSupported(false)
     306    , m_f3DAccelerationSupported(false)
    307307#endif
    308308    , m_enmGraphicsControllerTypeRecommended(KGraphicsControllerType_Null)
     
    340340    m_pEditorVideoMemorySize->setGuestOSTypeId(m_strGuestOSTypeId);
    341341
    342 #ifdef VBOX_WITH_3D_ACCELERATION
    343     /* Check if WDDM mode supported by the guest OS type: */
    344     m_fWddmModeSupported = UIGuestOSTypeHelpers::isWddmCompatibleOsType(m_strGuestOSTypeId);
    345     m_pEditorVideoMemorySize->set3DAccelerationSupported(m_fWddmModeSupported);
    346 #endif /* VBOX_WITH_3D_ACCELERATION */
    347342    /* Acquire recommended graphics controller type: */
    348343    m_enmGraphicsControllerTypeRecommended =
    349344        gpGlobalSession->guestOSTypeManager().getRecommendedGraphicsController(m_strGuestOSTypeId);
     345
    350346    /* Revalidate: */
    351347    revalidate();
     
    640636    bool fPass = true;
    641637
     638    /* Validation prerequisites: */
     639#ifdef VBOX_WITH_3D_ACCELERATION
     640    /* Check whether WDDM mode supported by the guest OS type: */
     641    m_f3DAccelerationSupported = UIGuestOSTypeHelpers::isWddmCompatibleOsType(m_strGuestOSTypeId);
     642
     643    /* Pass whether 3D acceleration is supported into Video Memory Editor: */
     644    m_pEditorVideoMemorySize->set3DAccelerationSupported(m_f3DAccelerationSupported);
     645    /* Enable/disable 3D acceleration check-box accordingly: */
     646    m_pEditorDisplayScreenFeatures->setEnabled(isMachineOffline() && m_f3DAccelerationSupported);
     647#endif /* VBOX_WITH_3D_ACCELERATION */
     648
    642649    /* Screen tab: */
    643650    {
     
    660667#ifdef VBOX_WITH_3D_ACCELERATION
    661668            /* 3D acceleration video RAM amount test: */
    662             else if (m_pEditorDisplayScreenFeatures->isEnabled3DAcceleration() && m_fWddmModeSupported)
     669            else if (m_f3DAccelerationSupported && m_pEditorDisplayScreenFeatures->isEnabled3DAcceleration())
    663670            {
    664671                uNeedBytes = qMax(uNeedBytes, (quint64) 128 * _1M);
     
    680687            {
    681688#ifdef VBOX_WITH_3D_ACCELERATION
    682                 if (m_pEditorDisplayScreenFeatures->isEnabled3DAcceleration())
     689                if (m_f3DAccelerationSupported && m_pEditorDisplayScreenFeatures->isEnabled3DAcceleration())
    683690                    message.second << tr("The virtual machine is configured to use 3D acceleration. This will work only if you "
    684691                                         "pick a different graphics controller (%1). Either disable 3D acceleration or switch "
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r106061 r106810  
    156156
    157157    /** Holds the guest OS type. */
    158     QString m_strGuestOSTypeId;
    159 #ifdef VBOX_WITH_3D_ACCELERATION
    160     /** Holds whether the guest OS supports WDDM. */
    161     bool          m_fWddmModeSupported;
     158    QString                  m_strGuestOSTypeId;
     159#ifdef VBOX_WITH_3D_ACCELERATION
     160    /** Holds whether 3D acceleration supported. */
     161    bool                     m_f3DAccelerationSupported;
    162162#endif
    163163    /** Holds recommended graphics controller type. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette