VirtualBox

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


Ignore:
Timestamp:
Jan 8, 2025 5:22:06 PM (4 weeks ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10767: VM settings / Display page: Make sure 3D acceleration check-box enable/disable rules are properly justified separately for Windows XPDM (VBoxVGA), WDDM (VBoxSVGA) and rest of guest OS types (VBoxVGA and VMSVGA).

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp

    r106566 r107543  
    4646
    4747#ifdef VBOX_WITH_3D_ACCELERATION
     48bool UIGuestOSTypeHelpers::isXpdmCompatibleOsType(const QString &strGuestOSTypeId)
     49{
     50    return    strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("WindowsXP"))
     51           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("WindowsVista"))
     52           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows7"))
     53           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("WindowsNT4"))
     54           || strGuestOSTypeId.startsWith(GUEST_OS_ID_STR_PARTIAL("Windows2000"));
     55}
     56
    4857bool UIGuestOSTypeHelpers::isWddmCompatibleOsType(const QString &strGuestOSTypeId)
    4958{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r105518 r107543  
    4444{
    4545#ifdef VBOX_WITH_3D_ACCELERATION
     46    /** Returns whether guest OS type with passed @a strGuestOSTypeId is XPDM compatible. */
     47    SHARED_LIBRARY_STUFF bool isXpdmCompatibleOsType(const QString &strGuestOSTypeId);
    4648    /** Returns whether guest OS type with passed @a strGuestOSTypeId is WDDM compatible. */
    4749    SHARED_LIBRARY_STUFF bool isWddmCompatibleOsType(const QString &strGuestOSTypeId);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r107477 r107543  
    639639    /* Validation prerequisites: */
    640640#ifdef VBOX_WITH_3D_ACCELERATION
    641     /* Check whether WDDM mode supported by the guest OS type: */
    642     m_f3DAccelerationSupported = UIGuestOSTypeHelpers::isWddmCompatibleOsType(m_strGuestOSTypeId);
     641    /* Special handling for Windows guests: */
     642    if (m_strGuestOSTypeId.startsWith("Windows"))
     643    {
     644        switch (graphicsControllerTypeCurrent())
     645        {
     646            case KGraphicsControllerType_VBoxVGA:
     647                m_f3DAccelerationSupported = UIGuestOSTypeHelpers::isXpdmCompatibleOsType(m_strGuestOSTypeId);
     648                break;
     649            case KGraphicsControllerType_VBoxSVGA:
     650                m_f3DAccelerationSupported = UIGuestOSTypeHelpers::isWddmCompatibleOsType(m_strGuestOSTypeId);
     651                break;
     652            default:
     653                break;
     654        }
     655    }
     656    /* For the rest of guests we are using VBoxVGA (old Linuxes) or VMSVGA,
     657     * it's difficult to draw the line between various guest OS types, enabling 3D always: */
     658    else
     659    {
     660        switch (graphicsControllerTypeCurrent())
     661        {
     662            case KGraphicsControllerType_VBoxVGA:
     663            case KGraphicsControllerType_VMSVGA:
     664                m_f3DAccelerationSupported = true;
     665                break;
     666            default:
     667                m_f3DAccelerationSupported = false;
     668                break;
     669        }
     670    }
    643671
    644672    /* Additionally make sure 3D acceleration is one of the features for current graphical controller: */
Note: See TracChangeset for help on using the changeset viewer.

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