VirtualBox

Changeset 101132 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 15, 2023 4:11:19 PM (15 months ago)
Author:
vboxsync
Message:

Main: Also guard GraphicsControllerType_VMSVGA in platform properties and don't include _Null the returned arrays (FE/Qt does not have translation for those anyway). bugref:10384

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp

    r101129 r101132  
    683683            static const GraphicsControllerType_T aGraphicsControllerTypes[] =
    684684            {
     685                GraphicsControllerType_Null,
    685686                GraphicsControllerType_VBoxVGA,
    686                 GraphicsControllerType_VMSVGA,
    687                 GraphicsControllerType_VBoxSVGA,
     687                GraphicsControllerType_VBoxSVGA
     688#ifdef VBOX_WITH_VMSVGA
     689              , GraphicsControllerType_VMSVGA
     690#endif
     691            };
     692            aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes + 1 /* Don't include _Null */,
     693                                                     aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes));
     694            break;
     695        }
     696
     697        case PlatformArchitecture_ARM:
     698        {
     699            static const GraphicsControllerType_T aGraphicsControllerTypes[] =
     700            {
    688701                GraphicsControllerType_Null
    689             };
    690             aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes,
    691                                                      aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes));
    692             break;
    693         }
    694 
    695         case PlatformArchitecture_ARM:
    696         {
    697             static const GraphicsControllerType_T aGraphicsControllerTypes[] =
    698             {
    699                 GraphicsControllerType_VMSVGA,
    700                 GraphicsControllerType_Null
    701             };
    702             aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes,
     702#ifdef VBOX_WITH_VMSVGA
     703              , GraphicsControllerType_VMSVGA
     704#endif
     705            };
     706            aSupportedGraphicsControllerTypes.assign(aGraphicsControllerTypes /* Don't include _Null */,
    703707                                                     aGraphicsControllerTypes + RT_ELEMENTS(aGraphicsControllerTypes));
    704708            break;
     
    733737#endif
    734738            };
    735             aSupportedNetworkAdapterTypes.assign(aNetworkAdapterTypes,
     739            aSupportedNetworkAdapterTypes.assign(aNetworkAdapterTypes + 1 /* Don't include _Null */,
    736740                                                 aNetworkAdapterTypes + RT_ELEMENTS(aNetworkAdapterTypes));
    737741            break;
     
    752756#endif
    753757            };
    754             aSupportedNetworkAdapterTypes.assign(aNetworkAdapterTypes,
     758            aSupportedNetworkAdapterTypes.assign(aNetworkAdapterTypes + 1 /* Don't include _Null */,
    755759                                                 aNetworkAdapterTypes + RT_ELEMENTS(aNetworkAdapterTypes));
    756760            break;
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