microsoft / GDK

Microsoft Public GDK
http://aka.ms/gamedevdocs
Other
1.48k stars 99 forks source link

[Suggestion] XGameRuntimeFeature total length enum field #44

Closed apache-hb closed 2 months ago

apache-hb commented 8 months ago

XGameRuntimeFeature currently has no enum case to indicate the number of fields, this requires hardcoding a 22 into an array length which is suboptimal when updating if new features are added to this enum.

bbowman commented 2 months ago

Hey @apache-hb sorry for the long time to respond to this issue but I'm curious on your use case for this.

The intended use case for XGameRuntimeFeature is that a consumer would call xgameruntimeisfeatureavailable to check that a specific feature is available for use at runtime. Adding an enum value for max or count as you appear to be suggesting would seem to imply dynamically querying for all available features which may actually be more error prone if a feature is added that the original code was not ready to handle.

I'm going to close the issue for now as I don't believe we plan to change this. Thank you for the suggestion though and feel free to provide more context on how this would be useful for you if you believe we should reconsider.