using System;
using System.Linq;
using System.Runtime.InteropServices;
using NvAPIWrapper.Native.Attributes;
using NvAPIWrapper.Native.General.Structures;
using NvAPIWrapper.Native.Interfaces;
namespace NvAPIWrapper.Native.DRS.Structures
{
///
/// Contains a list of all possible values for a setting as well as its default value
///
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructureVersion(1)]
public struct DRSSettingValues : IInitializable
{
internal const int MaximumNumberOfValues = 100;
internal StructureVersion _Version;
internal uint _NumberOfValues;
internal DRSSettingType _SettingType;
internal DRSSettingValue _DefaultValue;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = MaximumNumberOfValues)]
internal DRSSettingValue[] _Values;
///
/// Gets the setting's value type
///
public DRSSettingType SettingType
{
get => _SettingType;
}
///
/// Gets a list of possible values for the setting
///
public object[] Values
{
get
{
switch (_SettingType)
{
case DRSSettingType.Integer:
return ValuesAsInteger().Cast