Changeset 105959 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Sep 4, 2024 4:57:58 PM (8 months ago)
- svn:sync-xref-src-repo-rev:
- 164698
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r105873 r105959 830 830 * 831 831 * @returns VBox status code. 832 * @param enmArchitecture Platform architecture to query a feature for. 832 833 * @param enmController Graphics controller to return supported features for. 833 834 * @param vecSupportedGraphicsFeatures Returned features on success. 834 835 */ 835 836 /* static */ 836 int PlatformProperties::s_getSupportedGraphicsControllerFeatures(GraphicsControllerType_T enmController, 837 int PlatformProperties::s_getSupportedGraphicsControllerFeatures(PlatformArchitecture_T enmArchitecture, 838 GraphicsControllerType_T enmController, 837 839 std::vector<GraphicsFeature_T> &vecSupportedGraphicsFeatures) 838 840 { 839 switch (enmController) 840 { 841 switch (enmArchitecture) 842 { 843 case PlatformArchitecture_x86: 844 { 845 switch (enmController) 846 { 841 847 #ifdef VBOX_WITH_VMSVGA 842 case GraphicsControllerType_VBoxSVGA:843 {844 static const GraphicsFeature_T s_aGraphicsFeatures[] =845 {848 case GraphicsControllerType_VBoxSVGA: 849 { 850 static const GraphicsFeature_T s_aGraphicsFeatures[] = 851 { 846 852 # ifdef VBOX_WITH_VIDEOHWACCEL 847 GraphicsFeature_Acceleration2DVideo,853 GraphicsFeature_Acceleration2DVideo, 848 854 # endif 849 855 # ifdef VBOX_WITH_3D_ACCELERATION 850 GraphicsFeature_Acceleration3D856 GraphicsFeature_Acceleration3D 851 857 # endif 852 };853 RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures);854 break;855 }858 }; 859 RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures); 860 break; 861 } 856 862 #endif 857 case GraphicsControllerType_VBoxVGA: 858 RT_FALL_THROUGH(); 859 case GraphicsControllerType_QemuRamFB: 860 { 861 static const GraphicsFeature_T s_aGraphicsFeatures[] = 862 { 863 GraphicsFeature_None 864 }; 865 RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures); 866 break; 867 } 868 869 default: 870 return VERR_INVALID_PARAMETER; 863 case GraphicsControllerType_VBoxVGA: 864 RT_FALL_THROUGH(); 865 case GraphicsControllerType_QemuRamFB: 866 { 867 vecSupportedGraphicsFeatures.clear(); /* None supported. */ 868 break; 869 } 870 871 default: 872 { 873 AssertFailedStmt(vecSupportedGraphicsFeatures.clear()); 874 return VERR_INVALID_PARAMETER; 875 } 876 } 877 878 break; 879 } 880 881 case PlatformArchitecture_ARM: 882 { 883 vecSupportedGraphicsFeatures.clear(); /* None supported. */ 884 break; 885 } 886 887 default: 888 break; 871 889 } 872 890 … … 878 896 * 879 897 * @returns \c true if the given feature is supported, or \c false if not. 898 * @param enmArchitecture Platform architecture to query a feature for. 880 899 * @param enmController Graphics controlller to query a feature for. 881 900 * @param enmFeature Feature to query. 882 901 */ 883 902 /* static */ 884 bool PlatformProperties::s_isGraphicsControllerFeatureSupported( GraphicsControllerType_T enmController, GraphicsFeature_T enmFeature)903 bool PlatformProperties::s_isGraphicsControllerFeatureSupported(PlatformArchitecture_T enmArchitecture, GraphicsControllerType_T enmController, GraphicsFeature_T enmFeature) 885 904 { 886 905 std::vector<GraphicsFeature_T> vecSupportedGraphicsFeatures; 887 int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(enm Controller, vecSupportedGraphicsFeatures);906 int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(enmArchitecture, enmController, vecSupportedGraphicsFeatures); 888 907 if (RT_SUCCESS(vrc)) 889 908 return std::find(vecSupportedGraphicsFeatures.begin(), … … 990 1009 std::vector<GraphicsFeature_T> &aSupportedGraphicsFeatures) 991 1010 { 992 int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(aGraphicsControllerType, aSupportedGraphicsFeatures); 1011 int vrc = PlatformProperties::s_getSupportedGraphicsControllerFeatures(mPlatformArchitecture, 1012 aGraphicsControllerType, aSupportedGraphicsFeatures); 993 1013 if (RT_FAILURE(vrc)) 994 1014 return setError(E_INVALIDARG, tr("The graphics controller type (%d) is invalid"), aGraphicsControllerType);
Note:
See TracChangeset
for help on using the changeset viewer.