mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Eco mode overclocking fix
This commit is contained in:
274
app/Fans.Designer.cs
generated
274
app/Fans.Designer.cs
generated
@@ -31,12 +31,12 @@ namespace GHelper
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
ChartArea chartArea13 = new ChartArea();
|
||||
Title title13 = new Title();
|
||||
ChartArea chartArea14 = new ChartArea();
|
||||
Title title14 = new Title();
|
||||
ChartArea chartArea15 = new ChartArea();
|
||||
Title title15 = new Title();
|
||||
ChartArea chartArea1 = new ChartArea();
|
||||
Title title1 = new Title();
|
||||
ChartArea chartArea2 = new ChartArea();
|
||||
Title title2 = new Title();
|
||||
ChartArea chartArea3 = new ChartArea();
|
||||
Title title3 = new Title();
|
||||
panelFans = new Panel();
|
||||
labelFansResult = new Label();
|
||||
labelTip = new Label();
|
||||
@@ -67,6 +67,14 @@ namespace GHelper
|
||||
pictureBox1 = new PictureBox();
|
||||
labelPowerLimits = new Label();
|
||||
panelGPU = new Panel();
|
||||
panelGPUTemp = new Panel();
|
||||
labelGPUTemp = new Label();
|
||||
labelGPUTempTitle = new Label();
|
||||
trackGPUTemp = new TrackBar();
|
||||
panelGPUBoost = new Panel();
|
||||
labelGPUBoost = new Label();
|
||||
labelGPUBoostTitle = new Label();
|
||||
trackGPUBoost = new TrackBar();
|
||||
panelGPUMemory = new Panel();
|
||||
labelGPUMemory = new Label();
|
||||
labelGPUMemoryTitle = new Label();
|
||||
@@ -78,14 +86,6 @@ namespace GHelper
|
||||
panelTitleGPU = new Panel();
|
||||
pictureGPU = new PictureBox();
|
||||
labelGPU = new Label();
|
||||
panelGPUBoost = new Panel();
|
||||
labelGPUBoost = new Label();
|
||||
labelGPUBoostTitle = new Label();
|
||||
trackGPUBoost = new TrackBar();
|
||||
panelGPUTemp = new Panel();
|
||||
labelGPUTemp = new Label();
|
||||
labelGPUTempTitle = new Label();
|
||||
trackGPUTemp = new TrackBar();
|
||||
panelFans.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)picturePerf).BeginInit();
|
||||
tableFanCharts.SuspendLayout();
|
||||
@@ -102,16 +102,16 @@ namespace GHelper
|
||||
panelTitleCPU.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||
panelGPU.SuspendLayout();
|
||||
panelGPUTemp.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUTemp).BeginInit();
|
||||
panelGPUBoost.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUBoost).BeginInit();
|
||||
panelGPUMemory.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUMemory).BeginInit();
|
||||
panelGPUCore.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUCore).BeginInit();
|
||||
panelTitleGPU.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
||||
panelGPUBoost.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUBoost).BeginInit();
|
||||
panelGPUTemp.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUTemp).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// panelFans
|
||||
@@ -211,8 +211,8 @@ namespace GHelper
|
||||
//
|
||||
// chartGPU
|
||||
//
|
||||
chartArea13.Name = "ChartArea1";
|
||||
chartGPU.ChartAreas.Add(chartArea13);
|
||||
chartArea1.Name = "ChartArea1";
|
||||
chartGPU.ChartAreas.Add(chartArea1);
|
||||
chartGPU.Dock = DockStyle.Fill;
|
||||
chartGPU.Location = new Point(2, 350);
|
||||
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -220,13 +220,13 @@ namespace GHelper
|
||||
chartGPU.Size = new Size(760, 320);
|
||||
chartGPU.TabIndex = 17;
|
||||
chartGPU.Text = "chartGPU";
|
||||
title13.Name = "Title1";
|
||||
chartGPU.Titles.Add(title13);
|
||||
title1.Name = "Title1";
|
||||
chartGPU.Titles.Add(title1);
|
||||
//
|
||||
// chartCPU
|
||||
//
|
||||
chartArea14.Name = "ChartArea1";
|
||||
chartCPU.ChartAreas.Add(chartArea14);
|
||||
chartArea2.Name = "ChartArea1";
|
||||
chartCPU.ChartAreas.Add(chartArea2);
|
||||
chartCPU.Dock = DockStyle.Fill;
|
||||
chartCPU.Location = new Point(2, 10);
|
||||
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -234,13 +234,13 @@ namespace GHelper
|
||||
chartCPU.Size = new Size(760, 320);
|
||||
chartCPU.TabIndex = 14;
|
||||
chartCPU.Text = "chartCPU";
|
||||
title14.Name = "Title1";
|
||||
chartCPU.Titles.Add(title14);
|
||||
title2.Name = "Title1";
|
||||
chartCPU.Titles.Add(title2);
|
||||
//
|
||||
// chartMid
|
||||
//
|
||||
chartArea15.Name = "ChartArea3";
|
||||
chartMid.ChartAreas.Add(chartArea15);
|
||||
chartArea3.Name = "ChartArea3";
|
||||
chartMid.ChartAreas.Add(chartArea3);
|
||||
chartMid.Dock = DockStyle.Fill;
|
||||
chartMid.Location = new Point(2, 690);
|
||||
chartMid.Margin = new Padding(2, 10, 2, 10);
|
||||
@@ -248,8 +248,8 @@ namespace GHelper
|
||||
chartMid.Size = new Size(760, 322);
|
||||
chartMid.TabIndex = 14;
|
||||
chartMid.Text = "chartMid";
|
||||
title15.Name = "Title3";
|
||||
chartMid.Titles.Add(title15);
|
||||
title3.Name = "Title3";
|
||||
chartMid.Titles.Add(title3);
|
||||
chartMid.Visible = false;
|
||||
//
|
||||
// labelFans
|
||||
@@ -505,6 +505,100 @@ namespace GHelper
|
||||
panelGPU.Size = new Size(523, 634);
|
||||
panelGPU.TabIndex = 44;
|
||||
//
|
||||
// panelGPUTemp
|
||||
//
|
||||
panelGPUTemp.AutoSize = true;
|
||||
panelGPUTemp.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelGPUTemp.Controls.Add(labelGPUTemp);
|
||||
panelGPUTemp.Controls.Add(labelGPUTempTitle);
|
||||
panelGPUTemp.Controls.Add(trackGPUTemp);
|
||||
panelGPUTemp.Dock = DockStyle.Top;
|
||||
panelGPUTemp.Location = new Point(0, 485);
|
||||
panelGPUTemp.Name = "panelGPUTemp";
|
||||
panelGPUTemp.Size = new Size(523, 149);
|
||||
panelGPUTemp.TabIndex = 47;
|
||||
//
|
||||
// labelGPUTemp
|
||||
//
|
||||
labelGPUTemp.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
labelGPUTemp.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPUTemp.Location = new Point(378, 14);
|
||||
labelGPUTemp.Name = "labelGPUTemp";
|
||||
labelGPUTemp.Size = new Size(130, 32);
|
||||
labelGPUTemp.TabIndex = 44;
|
||||
labelGPUTemp.Text = "87C";
|
||||
labelGPUTemp.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelGPUTempTitle
|
||||
//
|
||||
labelGPUTempTitle.AutoSize = true;
|
||||
labelGPUTempTitle.Location = new Point(10, 14);
|
||||
labelGPUTempTitle.Name = "labelGPUTempTitle";
|
||||
labelGPUTempTitle.Size = new Size(173, 32);
|
||||
labelGPUTempTitle.TabIndex = 43;
|
||||
labelGPUTempTitle.Text = "Thermal Target";
|
||||
//
|
||||
// trackGPUTemp
|
||||
//
|
||||
trackGPUTemp.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
trackGPUTemp.Location = new Point(6, 57);
|
||||
trackGPUTemp.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUTemp.Maximum = 87;
|
||||
trackGPUTemp.Minimum = 75;
|
||||
trackGPUTemp.Name = "trackGPUTemp";
|
||||
trackGPUTemp.Size = new Size(502, 90);
|
||||
trackGPUTemp.TabIndex = 42;
|
||||
trackGPUTemp.TickFrequency = 5;
|
||||
trackGPUTemp.TickStyle = TickStyle.TopLeft;
|
||||
trackGPUTemp.Value = 87;
|
||||
//
|
||||
// panelGPUBoost
|
||||
//
|
||||
panelGPUBoost.AutoSize = true;
|
||||
panelGPUBoost.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelGPUBoost.Controls.Add(labelGPUBoost);
|
||||
panelGPUBoost.Controls.Add(labelGPUBoostTitle);
|
||||
panelGPUBoost.Controls.Add(trackGPUBoost);
|
||||
panelGPUBoost.Dock = DockStyle.Top;
|
||||
panelGPUBoost.Location = new Point(0, 345);
|
||||
panelGPUBoost.Name = "panelGPUBoost";
|
||||
panelGPUBoost.Size = new Size(523, 140);
|
||||
panelGPUBoost.TabIndex = 46;
|
||||
//
|
||||
// labelGPUBoost
|
||||
//
|
||||
labelGPUBoost.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
labelGPUBoost.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPUBoost.Location = new Point(374, 14);
|
||||
labelGPUBoost.Name = "labelGPUBoost";
|
||||
labelGPUBoost.Size = new Size(130, 32);
|
||||
labelGPUBoost.TabIndex = 44;
|
||||
labelGPUBoost.Text = "25W";
|
||||
labelGPUBoost.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelGPUBoostTitle
|
||||
//
|
||||
labelGPUBoostTitle.AutoSize = true;
|
||||
labelGPUBoostTitle.Location = new Point(10, 14);
|
||||
labelGPUBoostTitle.Name = "labelGPUBoostTitle";
|
||||
labelGPUBoostTitle.Size = new Size(174, 32);
|
||||
labelGPUBoostTitle.TabIndex = 43;
|
||||
labelGPUBoostTitle.Text = "Dynamic Boost";
|
||||
//
|
||||
// trackGPUBoost
|
||||
//
|
||||
trackGPUBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
trackGPUBoost.Location = new Point(6, 48);
|
||||
trackGPUBoost.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUBoost.Maximum = 25;
|
||||
trackGPUBoost.Minimum = 5;
|
||||
trackGPUBoost.Name = "trackGPUBoost";
|
||||
trackGPUBoost.Size = new Size(502, 90);
|
||||
trackGPUBoost.TabIndex = 42;
|
||||
trackGPUBoost.TickFrequency = 5;
|
||||
trackGPUBoost.TickStyle = TickStyle.TopLeft;
|
||||
trackGPUBoost.Value = 25;
|
||||
//
|
||||
// panelGPUMemory
|
||||
//
|
||||
panelGPUMemory.AutoSize = true;
|
||||
@@ -534,20 +628,20 @@ namespace GHelper
|
||||
labelGPUMemoryTitle.AutoSize = true;
|
||||
labelGPUMemoryTitle.Location = new Point(10, 14);
|
||||
labelGPUMemoryTitle.Name = "labelGPUMemoryTitle";
|
||||
labelGPUMemoryTitle.Size = new Size(169, 32);
|
||||
labelGPUMemoryTitle.Size = new Size(241, 32);
|
||||
labelGPUMemoryTitle.TabIndex = 43;
|
||||
labelGPUMemoryTitle.Text = "Memory Clock Offset";
|
||||
//
|
||||
// trackGPUMemory
|
||||
//
|
||||
trackGPUMemory.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
trackGPUMemory.LargeChange = 100;
|
||||
trackGPUMemory.LargeChange = 50;
|
||||
trackGPUMemory.Location = new Point(6, 48);
|
||||
trackGPUMemory.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUMemory.Maximum = 300;
|
||||
trackGPUMemory.Maximum = 250;
|
||||
trackGPUMemory.Minimum = -250;
|
||||
trackGPUMemory.Name = "trackGPUMemory";
|
||||
trackGPUMemory.Size = new Size(502, 90);
|
||||
trackGPUMemory.SmallChange = 10;
|
||||
trackGPUMemory.TabIndex = 42;
|
||||
trackGPUMemory.TickFrequency = 50;
|
||||
trackGPUMemory.TickStyle = TickStyle.TopLeft;
|
||||
@@ -579,14 +673,14 @@ namespace GHelper
|
||||
// trackGPUCore
|
||||
//
|
||||
trackGPUCore.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
trackGPUCore.LargeChange = 100;
|
||||
trackGPUCore.LargeChange = 50;
|
||||
trackGPUCore.Location = new Point(6, 47);
|
||||
trackGPUCore.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUCore.Maximum = 300;
|
||||
trackGPUCore.Maximum = 250;
|
||||
trackGPUCore.Minimum = -250;
|
||||
trackGPUCore.Name = "trackGPUCore";
|
||||
trackGPUCore.RightToLeft = RightToLeft.No;
|
||||
trackGPUCore.Size = new Size(502, 90);
|
||||
trackGPUCore.SmallChange = 10;
|
||||
trackGPUCore.TabIndex = 18;
|
||||
trackGPUCore.TickFrequency = 50;
|
||||
trackGPUCore.TickStyle = TickStyle.TopLeft;
|
||||
@@ -636,100 +730,6 @@ namespace GHelper
|
||||
labelGPU.TabIndex = 40;
|
||||
labelGPU.Text = "GPU Settings";
|
||||
//
|
||||
// panelGPUBoost
|
||||
//
|
||||
panelGPUBoost.AutoSize = true;
|
||||
panelGPUBoost.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelGPUBoost.Controls.Add(labelGPUBoost);
|
||||
panelGPUBoost.Controls.Add(labelGPUBoostTitle);
|
||||
panelGPUBoost.Controls.Add(trackGPUBoost);
|
||||
panelGPUBoost.Dock = DockStyle.Top;
|
||||
panelGPUBoost.Location = new Point(0, 345);
|
||||
panelGPUBoost.Name = "panelGPUBoost";
|
||||
panelGPUBoost.Size = new Size(523, 140);
|
||||
panelGPUBoost.TabIndex = 46;
|
||||
//
|
||||
// labelGPUBoost
|
||||
//
|
||||
labelGPUBoost.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
labelGPUBoost.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPUBoost.Location = new Point(374, 14);
|
||||
labelGPUBoost.Name = "labelGPUBoost";
|
||||
labelGPUBoost.Size = new Size(130, 32);
|
||||
labelGPUBoost.TabIndex = 44;
|
||||
labelGPUBoost.Text = "25W";
|
||||
labelGPUBoost.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelGPUBoostTitle
|
||||
//
|
||||
labelGPUBoostTitle.AutoSize = true;
|
||||
labelGPUBoostTitle.Location = new Point(10, 14);
|
||||
labelGPUBoostTitle.Name = "labelGPUBoostTitle";
|
||||
labelGPUBoostTitle.Size = new Size(174, 32);
|
||||
labelGPUBoostTitle.TabIndex = 43;
|
||||
labelGPUBoostTitle.Text = "Dynamic Boost";
|
||||
//
|
||||
// trackGPUBoost
|
||||
//
|
||||
trackGPUBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
trackGPUBoost.Location = new Point(6, 48);
|
||||
trackGPUBoost.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUBoost.Maximum = 25;
|
||||
trackGPUBoost.Minimum = 5;
|
||||
trackGPUBoost.Name = "trackGPUBoost";
|
||||
trackGPUBoost.Size = new Size(502, 90);
|
||||
trackGPUBoost.TabIndex = 42;
|
||||
trackGPUBoost.TickFrequency = 5;
|
||||
trackGPUBoost.TickStyle = TickStyle.TopLeft;
|
||||
trackGPUBoost.Value = 25;
|
||||
//
|
||||
// panelGPUTemp
|
||||
//
|
||||
panelGPUTemp.AutoSize = true;
|
||||
panelGPUTemp.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
panelGPUTemp.Controls.Add(labelGPUTemp);
|
||||
panelGPUTemp.Controls.Add(labelGPUTempTitle);
|
||||
panelGPUTemp.Controls.Add(trackGPUTemp);
|
||||
panelGPUTemp.Dock = DockStyle.Top;
|
||||
panelGPUTemp.Location = new Point(0, 485);
|
||||
panelGPUTemp.Name = "panelGPUTemp";
|
||||
panelGPUTemp.Size = new Size(523, 149);
|
||||
panelGPUTemp.TabIndex = 47;
|
||||
//
|
||||
// labelGPUTemp
|
||||
//
|
||||
labelGPUTemp.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
labelGPUTemp.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelGPUTemp.Location = new Point(378, 14);
|
||||
labelGPUTemp.Name = "labelGPUTemp";
|
||||
labelGPUTemp.Size = new Size(130, 32);
|
||||
labelGPUTemp.TabIndex = 44;
|
||||
labelGPUTemp.Text = "87C";
|
||||
labelGPUTemp.TextAlign = ContentAlignment.TopRight;
|
||||
//
|
||||
// labelGPUTempTitle
|
||||
//
|
||||
labelGPUTempTitle.AutoSize = true;
|
||||
labelGPUTempTitle.Location = new Point(10, 14);
|
||||
labelGPUTempTitle.Name = "labelGPUTempTitle";
|
||||
labelGPUTempTitle.Size = new Size(173, 32);
|
||||
labelGPUTempTitle.TabIndex = 43;
|
||||
labelGPUTempTitle.Text = "Thermal Target";
|
||||
//
|
||||
// trackGPUTemp
|
||||
//
|
||||
trackGPUTemp.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
trackGPUTemp.Location = new Point(6, 57);
|
||||
trackGPUTemp.Margin = new Padding(4, 2, 4, 2);
|
||||
trackGPUTemp.Maximum = 87;
|
||||
trackGPUTemp.Minimum = 75;
|
||||
trackGPUTemp.Name = "trackGPUTemp";
|
||||
trackGPUTemp.Size = new Size(502, 90);
|
||||
trackGPUTemp.TabIndex = 42;
|
||||
trackGPUTemp.TickFrequency = 5;
|
||||
trackGPUTemp.TickStyle = TickStyle.TopLeft;
|
||||
trackGPUTemp.Value = 87;
|
||||
//
|
||||
// Fans
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||
@@ -773,6 +773,12 @@ namespace GHelper
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||
panelGPU.ResumeLayout(false);
|
||||
panelGPU.PerformLayout();
|
||||
panelGPUTemp.ResumeLayout(false);
|
||||
panelGPUTemp.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUTemp).EndInit();
|
||||
panelGPUBoost.ResumeLayout(false);
|
||||
panelGPUBoost.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUBoost).EndInit();
|
||||
panelGPUMemory.ResumeLayout(false);
|
||||
panelGPUMemory.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUMemory).EndInit();
|
||||
@@ -782,12 +788,6 @@ namespace GHelper
|
||||
panelTitleGPU.ResumeLayout(false);
|
||||
panelTitleGPU.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit();
|
||||
panelGPUBoost.ResumeLayout(false);
|
||||
panelGPUBoost.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUBoost).EndInit();
|
||||
panelGPUTemp.ResumeLayout(false);
|
||||
panelGPUTemp.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)trackGPUTemp).EndInit();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
|
||||
47
app/Fans.cs
47
app/Fans.cs
@@ -15,6 +15,8 @@ namespace GHelper
|
||||
|
||||
static int MinRPM, MaxRPM;
|
||||
|
||||
NvidiaGpuControl? nvControl = null;
|
||||
|
||||
public Fans()
|
||||
{
|
||||
|
||||
@@ -35,7 +37,7 @@ namespace GHelper
|
||||
InitTheme();
|
||||
|
||||
MinRPM = 18;
|
||||
MaxRPM = HardwareMonitor.GetFanMax();
|
||||
MaxRPM = HardwareControl.GetFanMax();
|
||||
labelTip.Visible = false;
|
||||
labelTip.BackColor = Color.Transparent;
|
||||
|
||||
@@ -89,8 +91,9 @@ namespace GHelper
|
||||
|
||||
trackGPUCore.Scroll += trackGPU_Scroll;
|
||||
trackGPUMemory.Scroll += trackGPU_Scroll;
|
||||
trackGPUBoost.Scroll += trackGPU_Scroll;
|
||||
trackGPUTemp.Scroll += trackGPU_Scroll;
|
||||
|
||||
trackGPUBoost.Scroll += trackGPUPower_Scroll;
|
||||
trackGPUTemp.Scroll += trackGPUPower_Scroll;
|
||||
|
||||
trackGPUCore.MouseUp += TrackGPU_MouseUp;
|
||||
trackGPUMemory.MouseUp += TrackGPU_MouseUp;
|
||||
@@ -110,7 +113,7 @@ namespace GHelper
|
||||
|
||||
Shown += Fans_Shown;
|
||||
|
||||
InitGPUClocks();
|
||||
InitGPUControl();
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +131,7 @@ namespace GHelper
|
||||
Program.config.setConfig("gpu_core", trackGPUCore.Value);
|
||||
Program.config.setConfig("gpu_memory", trackGPUMemory.Value);
|
||||
|
||||
int status = Program.nvControl.SetClocks(trackGPUCore.Value, trackGPUMemory.Value);
|
||||
int status = nvControl.SetClocks(trackGPUCore.Value, trackGPUMemory.Value);
|
||||
if (status == -1) Program.RunAsAdmin("gpu");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -136,12 +139,16 @@ namespace GHelper
|
||||
Logger.WriteLine("F:" + ex.ToString());
|
||||
}
|
||||
|
||||
InitGPUClocks();
|
||||
InitGPUControl();
|
||||
}
|
||||
|
||||
private void InitGPUClocks()
|
||||
private void InitGPUControl()
|
||||
{
|
||||
if (Program.nvControl is null || !Program.nvControl.IsValid)
|
||||
if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia)
|
||||
{
|
||||
nvControl = (NvidiaGpuControl)HardwareControl.GpuControl;
|
||||
}
|
||||
else
|
||||
{
|
||||
panelGPU.Visible = false;
|
||||
return;
|
||||
@@ -151,9 +158,11 @@ namespace GHelper
|
||||
{
|
||||
panelGPU.Visible = true;
|
||||
|
||||
Program.nvControl.GetClocks(out int core, out int memory);
|
||||
nvControl.GetClocks(out int core, out int memory, out string gpuTitle);
|
||||
|
||||
trackGPUCore.Value = Math.Max(Math.Min(core, NvidiaGpuControl.MaxCoreOffset), NvidiaGpuControl.MinCoreOffset);
|
||||
trackGPUMemory.Value = Math.Max(Math.Min(memory, NvidiaGpuControl.MaxMemoryOffset), NvidiaGpuControl.MinMemoryOffset);
|
||||
labelGPU.Text = gpuTitle;
|
||||
|
||||
int gpu_boost = Program.config.getConfig("gpu_boost");
|
||||
int gpu_temp = Program.config.getConfig("gpu_temp");
|
||||
@@ -187,6 +196,16 @@ namespace GHelper
|
||||
}
|
||||
|
||||
private void trackGPU_Scroll(object? sender, EventArgs e)
|
||||
{
|
||||
if (sender is null) return;
|
||||
|
||||
TrackBar track = (TrackBar)sender;
|
||||
track.Value = (int)Math.Round((float)track.Value / 5) * 5;
|
||||
VisualiseGPUSettings();
|
||||
|
||||
}
|
||||
|
||||
private void trackGPUPower_Scroll(object? sender, EventArgs e)
|
||||
{
|
||||
VisualiseGPUSettings();
|
||||
}
|
||||
@@ -342,7 +361,7 @@ namespace GHelper
|
||||
bool cpuBmode = (Program.wmi.DeviceGet(ASUSWmi.PPT_CPUB0) >= 0); // 2022 model +
|
||||
bool cpuAmode = (Program.wmi.DeviceGet(ASUSWmi.PPT_TotalA0) >= 0); // 2021 model +
|
||||
|
||||
panelSliders.Visible = cpuAmode;
|
||||
panelPower.Visible = cpuAmode;
|
||||
panelCPU.Visible = cpuBmode;
|
||||
|
||||
// Yes, that's stupid, but Total slider on 2021 model actually adjusts CPU PPT
|
||||
@@ -487,6 +506,14 @@ namespace GHelper
|
||||
checkApplyFans.Checked = false;
|
||||
checkApplyPower.Checked = false;
|
||||
|
||||
trackGPUCore.Value = 0;
|
||||
trackGPUMemory.Value = 0;
|
||||
trackGPUBoost.Value = ASUSWmi.MaxGPUBoost;
|
||||
trackGPUTemp.Value = ASUSWmi.MaxGPUTemp;
|
||||
|
||||
Program.config.setConfig("gpu_core", ASUSWmi.MaxGPUBoost);
|
||||
Program.config.setConfig("gpu_memory", ASUSWmi.MaxGPUTemp);
|
||||
|
||||
Program.config.setConfigPerf("auto_apply", 0);
|
||||
Program.config.setConfigPerf("auto_apply_power", 0);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.58</AssemblyVersion>
|
||||
<AssemblyVersion>0.59</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace GHelper.Gpu;
|
||||
|
||||
public interface IGpuControl : IDisposable {
|
||||
public interface IGpuControl : IDisposable {
|
||||
bool IsNvidia { get; }
|
||||
bool IsValid { get; }
|
||||
int? GetCurrentTemperature();
|
||||
|
||||
@@ -3,6 +3,7 @@ using NvAPIWrapper.Native;
|
||||
using NvAPIWrapper.Native.GPU;
|
||||
using NvAPIWrapper.Native.GPU.Structures;
|
||||
using NvAPIWrapper.Native.Interfaces.GPU;
|
||||
using System.Diagnostics;
|
||||
using static NvAPIWrapper.Native.GPU.Structures.PerformanceStates20InfoV1;
|
||||
|
||||
namespace GHelper.Gpu;
|
||||
@@ -16,11 +17,36 @@ public class NvidiaGpuControl : IGpuControl
|
||||
public const int MinCoreOffset = -250;
|
||||
public const int MinMemoryOffset = -250;
|
||||
|
||||
private readonly PhysicalGPU? _internalGpu;
|
||||
private static PhysicalGPU? _internalGpu;
|
||||
|
||||
public NvidiaGpuControl()
|
||||
{
|
||||
_internalGpu = GetInternalDiscreteGpu();
|
||||
Create();
|
||||
}
|
||||
|
||||
|
||||
public static void Create()
|
||||
{
|
||||
try
|
||||
{
|
||||
_internalGpu = GetInternalDiscreteGpu();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex);
|
||||
_internalGpu = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void RecreateWithDelay(int delay = 5)
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(delay));
|
||||
Create();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public bool IsValid => _internalGpu != null;
|
||||
@@ -46,9 +72,12 @@ public class NvidiaGpuControl : IGpuControl
|
||||
|
||||
|
||||
|
||||
public void GetClocks(out int core, out int memory)
|
||||
public void GetClocks(out int core, out int memory, out string gpu)
|
||||
{
|
||||
PhysicalGPU internalGpu = _internalGpu!;
|
||||
|
||||
gpu = internalGpu.FullName;
|
||||
|
||||
Logger.WriteLine(internalGpu.FullName);
|
||||
Logger.WriteLine(internalGpu.ArchitectInformation.ToString());
|
||||
|
||||
@@ -96,7 +125,7 @@ public class NvidiaGpuControl : IGpuControl
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.WriteLine(ex.ToString());
|
||||
Logger.WriteLine(ex.Message);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using GHelper.Gpu;
|
||||
using System.Diagnostics;
|
||||
|
||||
public static class HardwareMonitor
|
||||
public static class HardwareControl
|
||||
{
|
||||
public static IGpuControl? GpuControl;
|
||||
|
||||
@@ -124,9 +124,8 @@ public static class HardwareMonitor
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void RecreateGpuControlWithDelay(int delay = 5)
|
||||
public static void RecreateGpuControlWithDelay(int delay = 3)
|
||||
{
|
||||
|
||||
// Re-enabling the discrete GPU takes a bit of time,
|
||||
// so a simple workaround is to refresh again after that happens
|
||||
Task.Run(async () =>
|
||||
@@ -134,9 +133,6 @@ public static class HardwareMonitor
|
||||
await Task.Delay(TimeSpan.FromSeconds(delay));
|
||||
RecreateGpuControl();
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void RecreateGpuControl()
|
||||
@@ -145,8 +141,6 @@ public static class HardwareMonitor
|
||||
{
|
||||
GpuControl?.Dispose();
|
||||
|
||||
// Detect valid GPU temperature provider.
|
||||
// We start with NVIDIA because there's always at least an integrated AMD GPU
|
||||
IGpuControl _gpuControl = new NvidiaGpuControl();
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
@@ -156,7 +150,6 @@ public static class HardwareMonitor
|
||||
|
||||
_gpuControl.Dispose();
|
||||
|
||||
/*
|
||||
_gpuControl = new AmdGpuControl();
|
||||
if (_gpuControl.IsValid)
|
||||
{
|
||||
@@ -164,7 +157,6 @@ public static class HardwareMonitor
|
||||
return;
|
||||
}
|
||||
_gpuControl.Dispose();
|
||||
*/
|
||||
|
||||
GpuControl = null;
|
||||
}
|
||||
@@ -1,481 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NvAPIWrapper.Native;
|
||||
using NvAPIWrapper.Native.DRS;
|
||||
using NvAPIWrapper.Native.DRS.Structures;
|
||||
|
||||
namespace NvAPIWrapper.DRS
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a NVIDIA driver settings profile
|
||||
/// </summary>
|
||||
public class DriverSettingsProfile
|
||||
{
|
||||
internal DriverSettingsProfile(DRSProfileHandle handle, DriverSettingsSession parentSession)
|
||||
{
|
||||
Handle = handle;
|
||||
Session = parentSession;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of applications under this profile
|
||||
/// </summary>
|
||||
public IEnumerable<ProfileApplication> Applications
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
return DRSApi.EnumApplications(Session.Handle, Handle)
|
||||
.Select(application => new ProfileApplication(application, this));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the profile support value for GPU series
|
||||
/// </summary>
|
||||
public DRSGPUSupport GPUSupport
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var profileInfo = DRSApi.GetProfileInfo(Session.Handle, Handle);
|
||||
|
||||
return profileInfo.GPUSupport;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var profileInfo = DRSApi.GetProfileInfo(Session.Handle, Handle);
|
||||
profileInfo.GPUSupport = value;
|
||||
DRSApi.SetProfileInfo(Session.Handle, Handle, profileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile handle
|
||||
/// </summary>
|
||||
public DRSProfileHandle Handle { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this profile is predefined
|
||||
/// </summary>
|
||||
public bool IsPredefined
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var profileInfo = DRSApi.GetProfileInfo(Session.Handle, Handle);
|
||||
|
||||
return profileInfo.IsPredefined;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this profile is valid and contains a non-zero handle
|
||||
/// </summary>
|
||||
public bool IsValid
|
||||
{
|
||||
get => !Handle.IsNull;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the profile
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var profileInfo = DRSApi.GetProfileInfo(Session.Handle, Handle);
|
||||
|
||||
return profileInfo.Name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of application registered under this profile
|
||||
/// </summary>
|
||||
public int NumberOfApplications
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var profileInfo = DRSApi.GetProfileInfo(Session.Handle, Handle);
|
||||
|
||||
return profileInfo.NumberOfApplications;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of settings under this profile
|
||||
/// </summary>
|
||||
public int NumberOfSettings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var profileInfo = DRSApi.GetProfileInfo(Session.Handle, Handle);
|
||||
|
||||
return profileInfo.NumberOfSettings;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the session that had queried this profile
|
||||
/// </summary>
|
||||
public DriverSettingsSession Session { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of settings under this profile
|
||||
/// </summary>
|
||||
public IEnumerable<ProfileSetting> Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
return DRSApi.EnumSettings(Session.Handle, Handle).Select(setting => new ProfileSetting(setting));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new profile
|
||||
/// </summary>
|
||||
/// <param name="session">The session to create this profile in.</param>
|
||||
/// <param name="profileName">The name of the profile.</param>
|
||||
/// <param name="gpuSupport">The supported GPU series for this profile.</param>
|
||||
/// <returns>An instance of <see cref="DriverSettingsProfile" /> representing this newly created profile.</returns>
|
||||
public static DriverSettingsProfile CreateProfile(
|
||||
DriverSettingsSession session,
|
||||
string profileName,
|
||||
DRSGPUSupport? gpuSupport = null)
|
||||
{
|
||||
gpuSupport = gpuSupport ?? new DRSGPUSupport();
|
||||
var profileInfo = new DRSProfileV1(profileName, gpuSupport.Value);
|
||||
var profileHandle = DRSApi.CreateProfile(session.Handle, profileInfo);
|
||||
|
||||
return new DriverSettingsProfile(profileHandle, session);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
return "[Invalid]";
|
||||
}
|
||||
|
||||
if (IsPredefined)
|
||||
{
|
||||
return $"{Name} (Predefined)";
|
||||
}
|
||||
|
||||
return Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes this profile and makes this instance invalid.
|
||||
/// </summary>
|
||||
public void Delete()
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
DRSApi.DeleteProfile(Session.Handle, Handle);
|
||||
Handle = DRSProfileHandle.DefaultHandle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes an application by its name.
|
||||
/// </summary>
|
||||
/// <param name="applicationName">The name of the application to be deleted.</param>
|
||||
public void DeleteApplicationByName(string applicationName)
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
DRSApi.DeleteApplication(Session.Handle, Handle, applicationName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a setting by its identification number
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to be deleted.</param>
|
||||
public void DeleteSetting(uint settingId)
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
DRSApi.DeleteProfileSetting(Session.Handle, Handle, settingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a setting by its known identification number.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to be deleted.</param>
|
||||
public void DeleteSetting(KnownSettingId settingId)
|
||||
{
|
||||
DeleteSetting(SettingInfo.GetSettingId(settingId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds an application by its name.
|
||||
/// </summary>
|
||||
/// <param name="applicationName">The name of the application to search for.</param>
|
||||
/// <returns>
|
||||
/// An instance of <see cref="ProfileApplication" /> if an application is found; otherwise <see langword="null" />
|
||||
/// .
|
||||
/// </returns>
|
||||
public ProfileApplication GetApplicationByName(string applicationName)
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var application = DRSApi.GetApplicationInfo(Session.Handle, Handle, applicationName);
|
||||
|
||||
if (application == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ProfileApplication(application, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Searches for a setting using its identification number.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to search for.</param>
|
||||
/// <returns>An instance of <see cref="ProfileSetting" /> if a setting is found; otherwise <see langword="null" />.</returns>
|
||||
public ProfileSetting GetSetting(uint settingId)
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var setting = DRSApi.GetSetting(Session.Handle, Handle, settingId);
|
||||
|
||||
if (setting == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ProfileSetting(setting.Value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Searches for a setting using its known identification number.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to search for.</param>
|
||||
/// <returns>An instance of <see cref="ProfileSetting" /> if a setting is found; otherwise <see langword="null" />.</returns>
|
||||
public ProfileSetting GetSetting(KnownSettingId settingId)
|
||||
{
|
||||
return GetSetting(SettingInfo.GetSettingId(settingId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restores applications and settings of this profile to their default. This also deletes custom profiles resulting in
|
||||
/// their handles becoming invalid.
|
||||
/// </summary>
|
||||
public void RestoreDefaults()
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var isPredefined = IsPredefined;
|
||||
DRSApi.RestoreDefaults(Session.Handle, Handle);
|
||||
|
||||
if (!isPredefined)
|
||||
{
|
||||
Handle = DRSProfileHandle.DefaultHandle;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restores a setting to its default value.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting.</param>
|
||||
public void RestoreSettingToDefault(uint settingId)
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
DRSApi.RestoreDefaults(Session.Handle, Handle, settingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restores a setting to its default value.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting.</param>
|
||||
public void RestoreSettingToDefault(KnownSettingId settingId)
|
||||
{
|
||||
RestoreSettingToDefault(SettingInfo.GetSettingId(settingId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to change its value.</param>
|
||||
/// <param name="settingType">The type of the setting value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(KnownSettingId settingId, DRSSettingType settingType, object value)
|
||||
{
|
||||
SetSetting(SettingInfo.GetSettingId(settingId), settingType, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to change its value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(KnownSettingId settingId, string value)
|
||||
{
|
||||
SetSetting(SettingInfo.GetSettingId(settingId), value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to change its value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(KnownSettingId settingId, byte[] value)
|
||||
{
|
||||
SetSetting(SettingInfo.GetSettingId(settingId), value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to change its value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(KnownSettingId settingId, uint value)
|
||||
{
|
||||
SetSetting(SettingInfo.GetSettingId(settingId), value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to change its value.</param>
|
||||
/// <param name="settingType">The type of the setting value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(uint settingId, DRSSettingType settingType, object value)
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid profile instance."
|
||||
);
|
||||
}
|
||||
|
||||
var setting = new DRSSettingV1(settingId, settingType, value);
|
||||
|
||||
DRSApi.SetSetting(Session.Handle, Handle, setting);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to change its value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(uint settingId, string value)
|
||||
{
|
||||
SetSetting(settingId, DRSSettingType.UnicodeString, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to change its value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(uint settingId, byte[] value)
|
||||
{
|
||||
SetSetting(settingId, DRSSettingType.Binary, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a new value for a setting or creates a new setting and sets its value
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to change its value.</param>
|
||||
/// <param name="value">The new value for the setting.</param>
|
||||
public void SetSetting(uint settingId, uint value)
|
||||
{
|
||||
SetSetting(settingId, DRSSettingType.Integer, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,236 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NvAPIWrapper.Native;
|
||||
using NvAPIWrapper.Native.DRS.Structures;
|
||||
|
||||
namespace NvAPIWrapper.DRS
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a driver settings session. This is the starting point for using DRS set of functionalities.
|
||||
/// </summary>
|
||||
public class DriverSettingsSession : IDisposable
|
||||
{
|
||||
internal DriverSettingsSession(DRSSessionHandle handle)
|
||||
{
|
||||
Handle = handle;
|
||||
}
|
||||
|
||||
private DriverSettingsSession() : this(DRSApi.CreateSession())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base settings profile
|
||||
/// </summary>
|
||||
public DriverSettingsProfile BaseProfile
|
||||
{
|
||||
get
|
||||
{
|
||||
var profileHandle = DRSApi.GetBaseProfile(Handle);
|
||||
|
||||
if (profileHandle.IsNull)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new DriverSettingsProfile(profileHandle, this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the global settings profile
|
||||
/// </summary>
|
||||
public DriverSettingsProfile CurrentGlobalProfile
|
||||
{
|
||||
get
|
||||
{
|
||||
var profileHandle = DRSApi.GetCurrentGlobalProfile(Handle);
|
||||
|
||||
if (profileHandle.IsNull)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new DriverSettingsProfile(profileHandle, this);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(value));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(value.Name))
|
||||
{
|
||||
throw new ArgumentException("Profile name can not be empty.", nameof(value));
|
||||
}
|
||||
|
||||
DRSApi.SetCurrentGlobalProfile(Handle, value.Name);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the session handle
|
||||
/// </summary>
|
||||
public DRSSessionHandle Handle { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of registered profiles
|
||||
/// </summary>
|
||||
public int NumberOfProfiles
|
||||
{
|
||||
get => DRSApi.GetNumberOfProfiles(Handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of all registered profiles
|
||||
/// </summary>
|
||||
public IEnumerable<DriverSettingsProfile> Profiles
|
||||
{
|
||||
get { return DRSApi.EnumProfiles(Handle).Select(handle => new DriverSettingsProfile(handle, this)); }
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
ReleaseUnmanagedResources();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new session and load the settings
|
||||
/// </summary>
|
||||
/// <returns>A new instance of <see cref="DriverSettingsSession" /> representing a session.</returns>
|
||||
public static DriverSettingsSession CreateAndLoad()
|
||||
{
|
||||
var session = new DriverSettingsSession();
|
||||
session.Load();
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new session and load the settings from a file
|
||||
/// </summary>
|
||||
/// <param name="fileName">The full path of file to load settings from.</param>
|
||||
/// <returns>A new instance of <see cref="DriverSettingsSession" /> representing a session.</returns>
|
||||
public static DriverSettingsSession CreateAndLoad(string fileName)
|
||||
{
|
||||
var session = new DriverSettingsSession();
|
||||
session.Load(fileName);
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Handle} ({NumberOfProfiles} Profiles)";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds an application by name. This method is useful when passed a full path of a file as it does return an
|
||||
/// application almost always describing the NVIDIA driver behavior regarding the passed executable file.
|
||||
/// </summary>
|
||||
/// <param name="applicationName">The name of the application (with extension) or the full path of an executable file.</param>
|
||||
/// <returns>An instance of <see cref="ProfileApplication" /> class.</returns>
|
||||
public ProfileApplication FindApplication(string applicationName)
|
||||
{
|
||||
var application = DRSApi.FindApplicationByName(Handle, applicationName, out var profileHandle);
|
||||
|
||||
if (application == null || !profileHandle.HasValue || profileHandle.Value.IsNull)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var profile = new DriverSettingsProfile(profileHandle.Value, this);
|
||||
|
||||
return new ProfileApplication(application, profile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds a profile based on the application named passed. This method is useful when passed a full path of a file as
|
||||
/// it does return a profile almost always describing the NVIDIA driver behavior regarding the passed executable file.
|
||||
/// </summary>
|
||||
/// <param name="applicationName">The name of the application (with extension) or the full path of an executable file.</param>
|
||||
/// <returns>
|
||||
/// An instance of <see cref="DriverSettingsProfile" /> class describing the NVIDIA driver behavior regarding the
|
||||
/// passed executable file.
|
||||
/// </returns>
|
||||
public DriverSettingsProfile FindApplicationProfile(string applicationName)
|
||||
{
|
||||
var application = DRSApi.FindApplicationByName(Handle, applicationName, out var profileHandle);
|
||||
|
||||
if (application == null || !profileHandle.HasValue || profileHandle.Value.IsNull)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new DriverSettingsProfile(profileHandle.Value, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds a profile based on its name.
|
||||
/// </summary>
|
||||
/// <param name="profileName">The profile name to search for.</param>
|
||||
/// <returns>An instance of <see cref="DriverSettingsProfile" /> class.</returns>
|
||||
public DriverSettingsProfile FindProfileByName(string profileName)
|
||||
{
|
||||
var profileHandle = DRSApi.FindProfileByName(Handle, profileName);
|
||||
|
||||
if (profileHandle.IsNull)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new DriverSettingsProfile(profileHandle, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets all settings to default.
|
||||
/// </summary>
|
||||
public void RestoreDefaults()
|
||||
{
|
||||
DRSApi.RestoreDefaults(Handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves the current session settings
|
||||
/// </summary>
|
||||
public void Save()
|
||||
{
|
||||
DRSApi.SaveSettings(Handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves the current session settings to a file
|
||||
/// </summary>
|
||||
/// <param name="fileName">The full path of file to save settings to.</param>
|
||||
public void Save(string fileName)
|
||||
{
|
||||
DRSApi.SaveSettings(Handle, fileName);
|
||||
}
|
||||
|
||||
private void Load()
|
||||
{
|
||||
DRSApi.LoadSettings(Handle);
|
||||
}
|
||||
|
||||
private void Load(string fileName)
|
||||
{
|
||||
DRSApi.LoadSettings(Handle, fileName);
|
||||
}
|
||||
|
||||
private void ReleaseUnmanagedResources()
|
||||
{
|
||||
DRSApi.DestroySession(Handle);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
~DriverSettingsSession()
|
||||
{
|
||||
ReleaseUnmanagedResources();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,555 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NvAPIWrapper.DRS
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum KnownSettingId : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Antialiasing - Line gamma
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Line gamma")]
|
||||
OpenGLAntiAliasingLineGamma = 0x2089BF6C,
|
||||
|
||||
/// <summary>
|
||||
/// Deep color for 3D applications
|
||||
/// </summary>
|
||||
[Description("Deep color for 3D applications")]
|
||||
OpenGLDeepColorScanOut = 0x2097C2F6,
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL default swap interval
|
||||
/// </summary>
|
||||
[Description("OpenGL default swap interval")]
|
||||
OpenGLDefaultSwapInterval = 0x206A6582,
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL default swap interval fraction
|
||||
/// </summary>
|
||||
[Description("OpenGL default swap interval fraction")]
|
||||
OpenGLDefaultSwapIntervalFractional = 0x206C4581,
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL default swap interval sign
|
||||
/// </summary>
|
||||
[Description("OpenGL default swap interval sign")]
|
||||
OpenGLDefaultSwapIntervalSign = 0x20655CFA,
|
||||
|
||||
/// <summary>
|
||||
/// Event Log Severity Threshold
|
||||
/// </summary>
|
||||
[Description("Event Log Severity Threshold")]
|
||||
OpenGLEventLogSeverityThreshold = 0x209DF23E,
|
||||
|
||||
/// <summary>
|
||||
/// Extension String version
|
||||
/// </summary>
|
||||
[Description("Extension String version")]
|
||||
OpenGLExtensionStringVersion = 0x20FF7493,
|
||||
|
||||
/// <summary>
|
||||
/// Buffer-flipping mode
|
||||
/// </summary>
|
||||
[Description("Buffer-flipping mode")] OpenGLForceBlit = 0x201F619F,
|
||||
|
||||
/// <summary>
|
||||
/// Force Stereo shuttering
|
||||
/// </summary>
|
||||
[Description("Force Stereo shuttering")]
|
||||
OpenGLForceStereo = 0x204D9A0C,
|
||||
|
||||
/// <summary>
|
||||
/// Preferred OpenGL GPU
|
||||
/// </summary>
|
||||
[Description("Preferred OpenGL GPU")] OpenGLImplicitGPUAffinity = 0x20D0F3E6,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum frames allowed
|
||||
/// </summary>
|
||||
[Description("Maximum frames allowed")]
|
||||
OpenGLMaximumFramesAllowed = 0x208E55E3,
|
||||
|
||||
/// <summary>
|
||||
/// Exported Overlay pixel types
|
||||
/// </summary>
|
||||
[Description("Exported Overlay pixel types")]
|
||||
OpenGLOverlayPixelType = 0x209AE66F,
|
||||
|
||||
/// <summary>
|
||||
/// Enable overlay
|
||||
/// </summary>
|
||||
[Description("Enable overlay")] OpenGLOverlaySupport = 0x206C28C4,
|
||||
|
||||
/// <summary>
|
||||
/// High level control of the rendering quality on OpenGL
|
||||
/// </summary>
|
||||
[Description("High level control of the rendering quality on OpenGL")]
|
||||
OpenGLQualityEnhancements = 0x20797D6C,
|
||||
|
||||
/// <summary>
|
||||
/// Unified back/depth buffer
|
||||
/// </summary>
|
||||
[Description("Unified back/depth buffer")]
|
||||
OpenGLSingleBackDepthBuffer = 0x20A29055,
|
||||
|
||||
/// <summary>
|
||||
/// Enable NV_gpu_multicast extension
|
||||
/// </summary>
|
||||
[Description("Enable NV_gpu_multicast extension")]
|
||||
OpenGLSLIMulticast = 0x2092D3BE,
|
||||
|
||||
/// <summary>
|
||||
/// Threaded optimization
|
||||
/// </summary>
|
||||
[Description("Threaded optimization")] OpenGLThreadControl = 0x20C1221E,
|
||||
|
||||
/// <summary>
|
||||
/// Event Log Tmon Severity Threshold
|
||||
/// </summary>
|
||||
[Description("Event Log Tmon Severity Threshold")]
|
||||
OpenGLTMONLevel = 0x202888C1,
|
||||
|
||||
/// <summary>
|
||||
/// Triple buffering
|
||||
/// </summary>
|
||||
[Description("Triple buffering")] OpenGLTripleBuffer = 0x20FDD1F9,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - Behavior Flags
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Behavior Flags")]
|
||||
AntiAliasingBehaviorFlags = 0x10ECDB82,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - Transparency Multisampling
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Transparency Multisampling")]
|
||||
AntiAliasingModeAlphaToCoverage = 0x10FC2D9C,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - Gamma correction
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Gamma correction")]
|
||||
AntiAliasingModeGammaCorrection = 0x107D639D,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - Setting
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Setting")]
|
||||
AntiAliasingModeMethod = 0x10D773D2,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - Transparency Supersampling
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Transparency Supersampling")]
|
||||
AntiAliasingModeReplay = 0x10D48A85,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - Mode
|
||||
/// </summary>
|
||||
[Description("Antialiasing - Mode")] AntiAliasingModeSelector = 0x107EFC5B,
|
||||
|
||||
/// <summary>
|
||||
/// Antialiasing - SLI AA
|
||||
/// </summary>
|
||||
[Description("Antialiasing - SLI AA")] AntiAliasingModeSelectorSLIAntiAliasing = 0x107AFC5B,
|
||||
|
||||
/// <summary>
|
||||
/// Anisotropic filtering setting
|
||||
/// </summary>
|
||||
[Description("Anisotropic filtering setting")]
|
||||
AnisotropicModeLevel = 0x101E61A9,
|
||||
|
||||
/// <summary>
|
||||
/// Anisotropic filtering mode
|
||||
/// </summary>
|
||||
[Description("Anisotropic filtering mode")]
|
||||
AnisotropicModeSelector = 0x10D2BB16,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA Predefined Ansel Usage
|
||||
/// </summary>
|
||||
[Description("NVIDIA Predefined Ansel Usage")]
|
||||
AnselAllow = 0x1035DB89,
|
||||
|
||||
/// <summary>
|
||||
/// Enable Ansel
|
||||
/// </summary>
|
||||
[Description("Enable Ansel")] AnselEnable = 0x1075D972,
|
||||
|
||||
/// <summary>
|
||||
/// Ansel flags for enabled applications
|
||||
/// </summary>
|
||||
[Description("Ansel flags for enabled applications")]
|
||||
AnselWhiteListed = 0x1085DA8A,
|
||||
|
||||
/// <summary>
|
||||
/// Application Profile Notification Popup Timeout
|
||||
/// </summary>
|
||||
[Description("Application Profile Notification Popup Timeout")]
|
||||
ApplicationProfileNotificationTimeOut = 0x104554B6,
|
||||
|
||||
/// <summary>
|
||||
/// Steam Application ID
|
||||
/// </summary>
|
||||
[Description("Steam Application ID")] ApplicationSteamId = 0x107CDDBC,
|
||||
|
||||
/// <summary>
|
||||
/// Battery Boost
|
||||
/// </summary>
|
||||
[Description("Battery Boost")] BatteryBoost = 0x10115C89,
|
||||
|
||||
/// <summary>
|
||||
/// Do not display this profile in the Control Panel
|
||||
/// </summary>
|
||||
[Description("Do not display this profile in the Control Panel")]
|
||||
ControlPanelHiddenProfile = 0x106D5CFF,
|
||||
|
||||
/// <summary>
|
||||
/// List of Universal GPU ids
|
||||
/// </summary>
|
||||
[Description("List of Universal GPU ids")]
|
||||
CUDAExcludedGPUs = 0x10354FF8,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum GPU Power
|
||||
/// </summary>
|
||||
[Description("Maximum GPU Power")] D3DOpenGLGPUMaximumPower = 0x10D1EF29,
|
||||
|
||||
/// <summary>
|
||||
/// Export Performance Counters
|
||||
/// </summary>
|
||||
[Description("Export Performance Counters")]
|
||||
ExportPerformanceCounters = 0x108F0841,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA Predefined FXAA Usage
|
||||
/// </summary>
|
||||
[Description("NVIDIA Predefined FXAA Usage")]
|
||||
FXAAAllow = 0x1034CB89,
|
||||
|
||||
/// <summary>
|
||||
/// Enable FXAA
|
||||
/// </summary>
|
||||
[Description("Enable FXAA")] FXAAEnable = 0x1074C972,
|
||||
|
||||
/// <summary>
|
||||
/// Enable FXAA Indicator
|
||||
/// </summary>
|
||||
[Description("Enable FXAA Indicator")] FXAAIndicatorEnable = 0x1068FB9C,
|
||||
|
||||
/// <summary>
|
||||
/// SLI indicator
|
||||
/// </summary>
|
||||
[Description("SLI indicator")] MCSFRShowSplit = 0x10287051,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA Quality upscaling
|
||||
/// </summary>
|
||||
[Description("NVIDIA Quality upscaling")]
|
||||
NvidiaQualityUpScaling = 0x10444444,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum AA samples allowed for a given application
|
||||
/// </summary>
|
||||
[Description("Maximum AA samples allowed for a given application")]
|
||||
OptimusMaximumAntiAliasing = 0x10F9DC83,
|
||||
|
||||
/// <summary>
|
||||
/// Display the PhysX indicator
|
||||
/// </summary>
|
||||
[Description("Display the PhysX indicator")]
|
||||
PhysxIndicator = 0x1094F16F,
|
||||
|
||||
/// <summary>
|
||||
/// Power management mode
|
||||
/// </summary>
|
||||
[Description("Power management mode")] PreferredPerformanceState = 0x1057EB71,
|
||||
|
||||
/// <summary>
|
||||
/// No override of Anisotropic filtering
|
||||
/// </summary>
|
||||
[Description("No override of Anisotropic filtering")]
|
||||
PreventUiAnisotropicOverride = 0x103BCCB5,
|
||||
|
||||
/// <summary>
|
||||
/// Frame Rate Limiter
|
||||
/// </summary>
|
||||
[Description("Frame Rate Limiter")] PerformanceStateFrameRateLimiter = 0x10834FEE,
|
||||
|
||||
/// <summary>
|
||||
/// Frame Rate Limiter 2 Control
|
||||
/// </summary>
|
||||
[Description("Frame Rate Limiter 2 Control")]
|
||||
PerformanceStateFrameRateLimiter2Control = 0x10834FFF,
|
||||
|
||||
/// <summary>
|
||||
/// Frame Rate Monitor
|
||||
/// </summary>
|
||||
[Description("Frame Rate Monitor")] PerformanceStateFrameRateLimiterGpsControl = 0x10834F01,
|
||||
|
||||
/// <summary>
|
||||
/// Frame Rate Monitor Control
|
||||
/// </summary>
|
||||
[Description("Frame Rate Monitor Control")]
|
||||
PerformanceStateFrameRateMonitorControl = 0x10834F05,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum resolution allowed for a given application
|
||||
/// </summary>
|
||||
[Description("Maximum resolution allowed for a given application")]
|
||||
ShimMaxResolution = 0x10F9DC82,
|
||||
|
||||
/// <summary>
|
||||
/// Optimus flags for enabled applications
|
||||
/// </summary>
|
||||
[Description("Optimus flags for enabled applications")]
|
||||
ShimMCCOMPAT = 0x10F9DC80,
|
||||
|
||||
/// <summary>
|
||||
/// Enable application for Optimus
|
||||
/// </summary>
|
||||
[Description("Enable application for Optimus")]
|
||||
ShimRenderingMode = 0x10F9DC81,
|
||||
|
||||
/// <summary>
|
||||
/// Shim Rendering Mode Options per application for Optimus
|
||||
/// </summary>
|
||||
[Description("Shim Rendering Mode Options per application for Optimus")]
|
||||
ShimRenderingOptions = 0x10F9DC84,
|
||||
|
||||
/// <summary>
|
||||
/// Number of GPUs to use on SLI rendering mode
|
||||
/// </summary>
|
||||
[Description("Number of GPUs to use on SLI rendering mode")]
|
||||
SLIGPUCount = 0x1033DCD1,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA predefined number of GPUs to use on SLI rendering mode
|
||||
/// </summary>
|
||||
[Description("NVIDIA predefined number of GPUs to use on SLI rendering mode")]
|
||||
SLIPredefinedGPUCount = 0x1033DCD2,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA predefined number of GPUs to use on SLI rendering mode on DirectX 10
|
||||
/// </summary>
|
||||
[Description("NVIDIA predefined number of GPUs to use on SLI rendering mode on DirectX 10")]
|
||||
SLIPredefinedGPUCountDX10 = 0x1033DCD3,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA predefined SLI mode
|
||||
/// </summary>
|
||||
[Description("NVIDIA predefined SLI mode")]
|
||||
SLIPredefinedMode = 0x1033CEC1,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA predefined SLI mode on DirectX 10
|
||||
/// </summary>
|
||||
[Description("NVIDIA predefined SLI mode on DirectX 10")]
|
||||
SLIPredefinedModeDX10 = 0x1033CEC2,
|
||||
|
||||
/// <summary>
|
||||
/// SLI rendering mode
|
||||
/// </summary>
|
||||
[Description("SLI rendering mode")] SLIRenderingMode = 0x1033CED1,
|
||||
|
||||
/// <summary>
|
||||
/// Virtual Reality pre-rendered frames
|
||||
/// </summary>
|
||||
[Description("Virtual Reality pre-rendered frames")]
|
||||
VRPreRenderLimit = 0x10111133,
|
||||
|
||||
/// <summary>
|
||||
/// Toggle the VRR global feature
|
||||
/// </summary>
|
||||
[Description("Toggle the VRR global feature")]
|
||||
VRRFeatureIndicator = 0x1094F157,
|
||||
|
||||
/// <summary>
|
||||
/// Display the VRR Overlay Indicator
|
||||
/// </summary>
|
||||
[Description("Display the VRR Overlay Indicator")]
|
||||
VRROverlayIndicator = 0x1095F16F,
|
||||
|
||||
/// <summary>
|
||||
/// VRR requested state
|
||||
/// </summary>
|
||||
[Description("VRR requested state")] VRRRequestState = 0x1094F1F7,
|
||||
|
||||
/// <summary>
|
||||
/// G-SYNC
|
||||
/// </summary>
|
||||
[Description("G-SYNC")] VRRApplicationOverride = 0x10A879CF,
|
||||
|
||||
/// <summary>
|
||||
/// G-SYNC
|
||||
/// </summary>
|
||||
[Description("G-SYNC")] VRRApplicationOverrideRequestState = 0x10A879AC,
|
||||
|
||||
/// <summary>
|
||||
/// Enable G-SYNC globally
|
||||
/// </summary>
|
||||
[Description("Enable G-SYNC globally")]
|
||||
VRRMode = 0x1194F158,
|
||||
|
||||
/// <summary>
|
||||
/// Flag to control smooth AFR behavior
|
||||
/// </summary>
|
||||
[Description("Flag to control smooth AFR behavior")]
|
||||
VSyncSmoothAFR = 0x101AE763,
|
||||
|
||||
/// <summary>
|
||||
/// Variable refresh Rate
|
||||
/// </summary>
|
||||
[Description("Variable refresh Rate")] VSyncVRRControl = 0x10A879CE,
|
||||
|
||||
/// <summary>
|
||||
/// Vsync - Behavior Flags
|
||||
/// </summary>
|
||||
[Description("Vsync - Behavior Flags")]
|
||||
VSyncBehaviorFlags = 0x10FDEC23,
|
||||
|
||||
/// <summary>
|
||||
/// Stereo - Swap eyes
|
||||
/// </summary>
|
||||
[Description("Stereo - Swap eyes")] WKSAPIStereoEyesExchange = 0x11AE435C,
|
||||
|
||||
/// <summary>
|
||||
/// Stereo - Display mode
|
||||
/// </summary>
|
||||
[Description("Stereo - Display mode")] WKSAPIStereoMode = 0x11E91A61,
|
||||
|
||||
/// <summary>
|
||||
/// Memory Allocation Policy
|
||||
/// </summary>
|
||||
[Description("Memory Allocation Policy")]
|
||||
WKSMemoryAllocationPolicy = 0x11112233,
|
||||
|
||||
/// <summary>
|
||||
/// Stereo - Dongle Support
|
||||
/// </summary>
|
||||
[Description("Stereo - Dongle Support")]
|
||||
WKSStereoDongleSupport = 0x112493BD,
|
||||
|
||||
/// <summary>
|
||||
/// Stereo - Enable
|
||||
/// </summary>
|
||||
[Description("Stereo - Enable")] WKSStereoSupport = 0x11AA9E99,
|
||||
|
||||
/// <summary>
|
||||
/// Stereo <20> swap mode
|
||||
/// </summary>
|
||||
[Description("Stereo <20> swap mode")] WKSStereoSwapMode = 0x11333333,
|
||||
|
||||
/// <summary>
|
||||
/// Ambient Occlusion
|
||||
/// </summary>
|
||||
[Description("Ambient Occlusion")] AmbientOcclusionMode = 0x667329,
|
||||
|
||||
/// <summary>
|
||||
/// NVIDIA Predefined Ambient Occlusion Usage
|
||||
/// </summary>
|
||||
[Description("NVIDIA Predefined Ambient Occlusion Usage")]
|
||||
AmbientOcclusionModeActive = 0x664339,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - Driver Controlled LOD Bias
|
||||
/// </summary>
|
||||
[Description("Texture filtering - Driver Controlled LOD Bias")]
|
||||
AutoLODBiasAdjust = 0x638E8F,
|
||||
|
||||
/// <summary>
|
||||
/// Export Performance Counters for DX9 only
|
||||
/// </summary>
|
||||
[Description("Export Performance Counters for DX9 only")]
|
||||
ExportPerformanceCountersDX9Only = 0xB65E72,
|
||||
|
||||
/// <summary>
|
||||
/// ICafe Settings
|
||||
/// </summary>
|
||||
[Description("ICafe Settings")] ICafeLogoConfig = 0xDB1337,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - LOD Bias
|
||||
/// </summary>
|
||||
[Description("Texture filtering - LOD Bias")]
|
||||
LODBiasAdjust = 0x738E8F,
|
||||
|
||||
/// <summary>
|
||||
/// Enable sample interleaving (MFAA)
|
||||
/// </summary>
|
||||
[Description("Enable sample interleaving (MFAA)")]
|
||||
MaxwellBSampleInterleave = 0x98C1AC,
|
||||
|
||||
/// <summary>
|
||||
/// Maximum pre-rendered frames
|
||||
/// </summary>
|
||||
[Description("Maximum pre-rendered frames")]
|
||||
PreRenderLimit = 0x7BA09E,
|
||||
|
||||
/// <summary>
|
||||
/// Shader Cache
|
||||
/// </summary>
|
||||
[Description("Shader Cache")] PerformanceStateShaderDiskCache = 0x198FFF,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - Anisotropic sample optimization
|
||||
/// </summary>
|
||||
[Description("Texture filtering - Anisotropic sample optimization")]
|
||||
PerformanceStateTextureFilteringAnisotropicOptimization = 0xE73211,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - Anisotropic filter optimization
|
||||
/// </summary>
|
||||
[Description("Texture filtering - Anisotropic filter optimization")]
|
||||
PerformanceStateTextureFilteringBiLinearInAnisotropic = 0x84CD70,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - Trilinear optimization
|
||||
/// </summary>
|
||||
[Description("Texture filtering - Trilinear optimization")]
|
||||
PerformanceStateTextureFilteringDisableTrilinearSlope = 0x2ECAF2,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - Negative LOD bias
|
||||
/// </summary>
|
||||
[Description("Texture filtering - Negative LOD bias")]
|
||||
PerformanceStateTextureFilteringNoNegativeLODBias = 0x19BB68,
|
||||
|
||||
/// <summary>
|
||||
/// Texture filtering - Quality
|
||||
/// </summary>
|
||||
[Description("Texture filtering - Quality")]
|
||||
QualityEnhancements = 0xCE2691,
|
||||
|
||||
/// <summary>
|
||||
/// Preferred refresh rate
|
||||
/// </summary>
|
||||
[Description("Preferred refresh rate")]
|
||||
RefreshRateOverride = 0x64B541,
|
||||
|
||||
/// <summary>
|
||||
/// PowerThrottle
|
||||
/// </summary>
|
||||
[Description("PowerThrottle")] SetPowerThrottleForPCIeCompliance = 0xAE785C,
|
||||
|
||||
/// <summary>
|
||||
/// VAB Default Data
|
||||
/// </summary>
|
||||
[Description("VAB Default Data")] SetVABData = 0xAB8687,
|
||||
|
||||
/// <summary>
|
||||
/// Vertical Sync
|
||||
/// </summary>
|
||||
[Description("Vertical Sync")] VSyncMode = 0xA879CF,
|
||||
|
||||
/// <summary>
|
||||
/// Vertical Sync Tear Control
|
||||
/// </summary>
|
||||
[Description("Vertical Sync Tear Control")]
|
||||
VSyncTearControl = 0x5A375C,
|
||||
|
||||
InvalidSetting = 0xFFFFFFFF
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,424 +0,0 @@
|
||||
using System;
|
||||
using NvAPIWrapper.Native;
|
||||
using NvAPIWrapper.Native.DRS.Structures;
|
||||
using NvAPIWrapper.Native.Exceptions;
|
||||
using NvAPIWrapper.Native.Interfaces.DRS;
|
||||
|
||||
namespace NvAPIWrapper.DRS
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an application rule registered in a profile
|
||||
/// </summary>
|
||||
public class ProfileApplication
|
||||
{
|
||||
private IDRSApplication _application;
|
||||
|
||||
internal ProfileApplication(IDRSApplication application, DriverSettingsProfile profile)
|
||||
{
|
||||
Profile = profile;
|
||||
_application = application;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application name
|
||||
/// </summary>
|
||||
public string ApplicationName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
return _application.ApplicationName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application command line
|
||||
/// </summary>
|
||||
public string CommandLine
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV4 applicationV4)
|
||||
{
|
||||
return applicationV4.ApplicationCommandLine;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of files that are necessary to be present inside the application parent directory
|
||||
/// </summary>
|
||||
public string[] FilesInFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV2 applicationV2)
|
||||
{
|
||||
return applicationV2.FilesInFolder;
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV3 applicationV3)
|
||||
{
|
||||
return applicationV3.FilesInFolder;
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV4 applicationV4)
|
||||
{
|
||||
return applicationV4.FilesInFolder;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application friendly name
|
||||
/// </summary>
|
||||
public string FriendlyName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
return _application.FriendlyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this application rule needs a specific command line; or <see langword="null" />
|
||||
/// if this information is not available.
|
||||
/// </summary>
|
||||
public bool? HasCommandLine
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV3 applicationV3)
|
||||
{
|
||||
return applicationV3.HasCommandLine;
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV4 applicationV4)
|
||||
{
|
||||
return applicationV4.HasCommandLine;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this application is a metro application; or <see langword="null" /> if this
|
||||
/// information is not available.
|
||||
/// </summary>
|
||||
public bool? IsMetroApplication
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV3 applicationV3)
|
||||
{
|
||||
return applicationV3.IsMetroApplication;
|
||||
}
|
||||
|
||||
if (_application is DRSApplicationV4 applicationV4)
|
||||
{
|
||||
return applicationV4.IsMetroApplication;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this application is predefined by the NVIDIA driver
|
||||
/// </summary>
|
||||
public bool IsPredefined
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
return _application.IsPredefined;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this instance of <see cref="ProfileApplication" /> is a valid instance
|
||||
/// representing an application in a profile
|
||||
/// </summary>
|
||||
public bool IsValid
|
||||
{
|
||||
get => _application != null && Profile.IsValid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application launcher name
|
||||
/// </summary>
|
||||
public string LauncherName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
return _application.LauncherName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parent profile instance
|
||||
/// </summary>
|
||||
public DriverSettingsProfile Profile { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new application
|
||||
/// </summary>
|
||||
/// <param name="profile">The profile to create the new application in.</param>
|
||||
/// <param name="applicationName">The application name (with extension).</param>
|
||||
/// <param name="friendlyName">The application friendly name.</param>
|
||||
/// <param name="launcherName">The application launcher name.</param>
|
||||
/// <param name="fileInFolders">An array of files necessary to be present inside the application parent directory.</param>
|
||||
/// <param name="isMetro">A boolean value indicating if this application is a metro application.</param>
|
||||
/// <param name="commandLine">The application command line string.</param>
|
||||
/// <returns>A new instance of <see cref="ProfileApplication" /> representing the newly created application.</returns>
|
||||
// ReSharper disable once TooManyArguments
|
||||
// ReSharper disable once FunctionComplexityOverflow
|
||||
public static ProfileApplication CreateApplication(
|
||||
DriverSettingsProfile profile,
|
||||
string applicationName,
|
||||
string friendlyName = null,
|
||||
string launcherName = null,
|
||||
string[] fileInFolders = null,
|
||||
bool isMetro = false,
|
||||
string commandLine = null
|
||||
)
|
||||
{
|
||||
var createDelegates = new Func<string, string, string, string[], bool, string, IDRSApplication>[]
|
||||
{
|
||||
CreateApplicationInstanceV4,
|
||||
CreateApplicationInstanceV3,
|
||||
CreateApplicationInstanceV2,
|
||||
CreateApplicationInstanceV1
|
||||
};
|
||||
|
||||
Exception lastException = null;
|
||||
IDRSApplication application = null;
|
||||
|
||||
foreach (var func in createDelegates)
|
||||
{
|
||||
try
|
||||
{
|
||||
// ReSharper disable once EventExceptionNotDocumented
|
||||
application = func(
|
||||
applicationName,
|
||||
friendlyName,
|
||||
launcherName,
|
||||
fileInFolders,
|
||||
isMetro,
|
||||
commandLine
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
catch (NVIDIANotSupportedException e)
|
||||
{
|
||||
// ignore
|
||||
lastException = e;
|
||||
}
|
||||
}
|
||||
|
||||
if (application == null)
|
||||
{
|
||||
// ReSharper disable once ThrowingSystemException
|
||||
throw lastException;
|
||||
}
|
||||
|
||||
application = DRSApi.CreateApplication(profile.Session.Handle, profile.Handle, application);
|
||||
|
||||
return new ProfileApplication(application, profile);
|
||||
}
|
||||
|
||||
// ReSharper disable once TooManyArguments
|
||||
private static IDRSApplication CreateApplicationInstanceV1(
|
||||
string applicationName,
|
||||
string friendlyName = null,
|
||||
string launcherName = null,
|
||||
string[] fileInFolders = null,
|
||||
bool isMetro = false,
|
||||
string commandLine = null
|
||||
)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(commandLine))
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
"CommandLine is not supported with the current execution environment."
|
||||
);
|
||||
}
|
||||
|
||||
if (fileInFolders?.Length > 0)
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
"Same folder file presence check is not supported with the current execution environment."
|
||||
);
|
||||
}
|
||||
|
||||
return new DRSApplicationV1(
|
||||
applicationName,
|
||||
friendlyName,
|
||||
launcherName
|
||||
);
|
||||
}
|
||||
|
||||
// ReSharper disable once TooManyArguments
|
||||
private static IDRSApplication CreateApplicationInstanceV2(
|
||||
string applicationName,
|
||||
string friendlyName = null,
|
||||
string launcherName = null,
|
||||
string[] fileInFolders = null,
|
||||
bool isMetro = false,
|
||||
string commandLine = null
|
||||
)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(commandLine))
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
"CommandLine is not supported with the current execution environment."
|
||||
);
|
||||
}
|
||||
|
||||
return new DRSApplicationV2(
|
||||
applicationName,
|
||||
friendlyName,
|
||||
launcherName,
|
||||
fileInFolders
|
||||
);
|
||||
}
|
||||
|
||||
// ReSharper disable once TooManyArguments
|
||||
private static IDRSApplication CreateApplicationInstanceV3(
|
||||
string applicationName,
|
||||
string friendlyName = null,
|
||||
string launcherName = null,
|
||||
string[] fileInFolders = null,
|
||||
bool isMetro = false,
|
||||
string commandLine = null
|
||||
)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(commandLine))
|
||||
{
|
||||
throw new NotSupportedException(
|
||||
"CommandLine is not supported with the current execution environment."
|
||||
);
|
||||
}
|
||||
|
||||
return new DRSApplicationV3(
|
||||
applicationName,
|
||||
friendlyName,
|
||||
launcherName,
|
||||
fileInFolders,
|
||||
isMetro
|
||||
);
|
||||
}
|
||||
|
||||
// ReSharper disable once TooManyArguments
|
||||
private static IDRSApplication CreateApplicationInstanceV4(
|
||||
string applicationName,
|
||||
string friendlyName = null,
|
||||
string launcherName = null,
|
||||
string[] fileInFolders = null,
|
||||
bool isMetro = false,
|
||||
string commandLine = null
|
||||
)
|
||||
{
|
||||
return new DRSApplicationV4(
|
||||
applicationName,
|
||||
friendlyName,
|
||||
launcherName,
|
||||
fileInFolders,
|
||||
isMetro,
|
||||
commandLine
|
||||
);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
return "[Invalid]";
|
||||
}
|
||||
|
||||
if (IsPredefined)
|
||||
{
|
||||
return $"{ApplicationName} (Predefined)";
|
||||
}
|
||||
|
||||
return ApplicationName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes this application and makes this instance invalid
|
||||
/// </summary>
|
||||
public void Delete()
|
||||
{
|
||||
if (!IsValid)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Can not perform this operation with an invalid application instance."
|
||||
);
|
||||
}
|
||||
|
||||
DRSApi.DeleteApplication(Profile.Session.Handle, Profile.Handle, _application);
|
||||
_application = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
using System;
|
||||
using NvAPIWrapper.Native.DRS;
|
||||
using NvAPIWrapper.Native.DRS.Structures;
|
||||
|
||||
namespace NvAPIWrapper.DRS
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a profile setting and its value
|
||||
/// </summary>
|
||||
public class ProfileSetting
|
||||
{
|
||||
private readonly DRSSettingV1 _setting;
|
||||
|
||||
internal ProfileSetting(DRSSettingV1 setting)
|
||||
{
|
||||
_setting = setting;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current value of the setting
|
||||
/// </summary>
|
||||
public object CurrentValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPredefinedValueValid && IsCurrentValuePredefined)
|
||||
{
|
||||
return _setting.PredefinedValue;
|
||||
}
|
||||
|
||||
return _setting.CurrentValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if the current value is the predefined value.
|
||||
/// </summary>
|
||||
public bool IsCurrentValuePredefined
|
||||
{
|
||||
get => _setting.IsCurrentValuePredefined;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this setting had a predefined valid value.
|
||||
/// </summary>
|
||||
public bool IsPredefinedValueValid
|
||||
{
|
||||
get => _setting.IsPredefinedValueValid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the predefined value of this setting.
|
||||
/// </summary>
|
||||
public object PredefinedValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsPredefinedValueValid)
|
||||
{
|
||||
throw new InvalidOperationException("Predefined value is not valid.");
|
||||
}
|
||||
|
||||
return _setting.PredefinedValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the setting identification number
|
||||
/// </summary>
|
||||
public uint SettingId
|
||||
{
|
||||
get => _setting.Id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets additional information regarding this setting including possible valid values
|
||||
/// </summary>
|
||||
public SettingInfo SettingInfo
|
||||
{
|
||||
get => SettingInfo.FromId(SettingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile location of this setting
|
||||
/// </summary>
|
||||
public DRSSettingLocation SettingLocation
|
||||
{
|
||||
get => _setting.SettingLocation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value type of this setting
|
||||
/// </summary>
|
||||
public DRSSettingType SettingType
|
||||
{
|
||||
get => _setting.SettingType;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
string settingName = null;
|
||||
|
||||
try
|
||||
{
|
||||
settingName = SettingInfo.Name;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(settingName))
|
||||
{
|
||||
settingName = $"#{SettingId:X}";
|
||||
}
|
||||
|
||||
if (IsCurrentValuePredefined)
|
||||
{
|
||||
return $"{settingName} = {CurrentValue ?? "[NULL]"} (Predefined)";
|
||||
}
|
||||
|
||||
return $"{settingName} = {CurrentValue ?? "[NULL]"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,360 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using NvAPIWrapper.Native;
|
||||
using NvAPIWrapper.Native.DRS;
|
||||
|
||||
namespace NvAPIWrapper.DRS
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information about a setting
|
||||
/// </summary>
|
||||
public class SettingInfo
|
||||
{
|
||||
private static uint[] _availableSettingIds;
|
||||
|
||||
private SettingInfo(uint settingId)
|
||||
{
|
||||
SettingId = settingId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an array of available possible valid values.
|
||||
/// </summary>
|
||||
public object[] AvailableValues
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsAvailable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return DRSApi.EnumAvailableSettingValues(SettingId).Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default value of this setting
|
||||
/// </summary>
|
||||
public object DefaultValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsAvailable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var values = DRSApi.EnumAvailableSettingValues(SettingId);
|
||||
|
||||
return values.DefaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this setting is available on this machine and with the current version of NVIDIA
|
||||
/// driver
|
||||
/// </summary>
|
||||
public bool IsAvailable
|
||||
{
|
||||
get => GetAvailableSetting().Any(info => info.SettingId == SettingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a boolean value indicating if this setting is know by this library
|
||||
/// </summary>
|
||||
public bool IsKnown
|
||||
{
|
||||
get => IsSettingKnown(SettingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description of this setting from the library or <see langword="null" /> if this setting is not known by
|
||||
/// the library.
|
||||
/// </summary>
|
||||
public string KnownDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsKnown || KnownSettingId == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return GetSettingDescription(KnownSettingId.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the known identification number of this setting from the library or <see langword="null" /> if this setting is
|
||||
/// not known by the library.
|
||||
/// </summary>
|
||||
public KnownSettingId? KnownSettingId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsKnown)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return GetKnownSettingId(SettingId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of a static class or an enum containing possible known values for this setting from the library or
|
||||
/// <see langword="null" /> if this setting is not known by the library
|
||||
/// </summary>
|
||||
public Type KnownValueType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsKnown || !IsAvailable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var name = KnownSettingId.ToString();
|
||||
var nameSpace = typeof(SettingInfo).Namespace + ".SettingValues";
|
||||
|
||||
if (SettingType == DRSSettingType.Integer)
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(type =>
|
||||
type.IsEnum &&
|
||||
type.Namespace?.Equals(nameSpace, StringComparison.InvariantCultureIgnoreCase) == true &&
|
||||
type.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
if (SettingType == DRSSettingType.String || SettingType == DRSSettingType.UnicodeString)
|
||||
{
|
||||
return Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(type =>
|
||||
type.IsClass &&
|
||||
type.Namespace?.Equals(nameSpace, StringComparison.InvariantCultureIgnoreCase) == true &&
|
||||
type.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the setting from NVIDIA driver or <see langword="null" /> if the setting is not available on this
|
||||
/// machine.
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsAvailable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return DRSApi.GetSettingNameFromId(SettingId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the setting identification number
|
||||
/// </summary>
|
||||
public uint SettingId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value type of the setting from NVIDIA driver or <see langword="null" /> if the setting is not available on
|
||||
/// this machine.
|
||||
/// </summary>
|
||||
public DRSSettingType? SettingType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsAvailable)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var values = DRSApi.EnumAvailableSettingValues(SettingId);
|
||||
|
||||
return values.SettingType;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information regarding a setting from its identification number.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The identification number of the setting to get information about.</param>
|
||||
/// <returns>An instance of <see cref="SettingInfo" /> containing information about the setting.</returns>
|
||||
public static SettingInfo FromId(uint settingId)
|
||||
{
|
||||
return new SettingInfo(settingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information regarding a setting from its known identification number.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The known identification number of the setting to get information about.</param>
|
||||
/// <returns>An instance of <see cref="SettingInfo" /> containing information about the setting.</returns>
|
||||
public static SettingInfo FromKnownSettingId(KnownSettingId settingId)
|
||||
{
|
||||
return FromId(GetSettingId(settingId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets information regarding a setting from its name.
|
||||
/// </summary>
|
||||
/// <param name="settingName">The name of the setting to get information about.</param>
|
||||
/// <returns>An instance of <see cref="SettingInfo" /> containing information about the setting.</returns>
|
||||
public static SettingInfo FromName(string settingName)
|
||||
{
|
||||
var settingId = DRSApi.GetSettingIdFromName(settingName);
|
||||
|
||||
return FromId(settingId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all available setting on this machine
|
||||
/// </summary>
|
||||
/// <returns>Instances of <see cref="SettingInfo" /> each representing a available setting on this machine.</returns>
|
||||
public static SettingInfo[] GetAvailableSetting()
|
||||
{
|
||||
if (_availableSettingIds == null)
|
||||
{
|
||||
_availableSettingIds = DRSApi.EnumAvailableSettingIds();
|
||||
}
|
||||
|
||||
return _availableSettingIds.Select(FromId).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the known identification number of a setting from its identification number
|
||||
/// </summary>
|
||||
/// <param name="settingId">The setting identification number.</param>
|
||||
/// <returns>The known setting identification number if the setting is known; otherwise <see langword="null" />.</returns>
|
||||
public static KnownSettingId? GetKnownSettingId(uint settingId)
|
||||
{
|
||||
if (!IsSettingKnown(settingId))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return (KnownSettingId) settingId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the known setting description from its identification number
|
||||
/// </summary>
|
||||
/// <param name="knownSettingId">The known setting identification number.</param>
|
||||
/// <returns>The known setting description if available; otherwise <see langword="null" />.</returns>
|
||||
public static string GetSettingDescription(KnownSettingId knownSettingId)
|
||||
{
|
||||
var enumName = Enum.GetName(typeof(KnownSettingId), knownSettingId);
|
||||
|
||||
if (enumName == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var enumField = typeof(KnownSettingId).GetField(enumName);
|
||||
|
||||
if (enumField == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var descriptionAttribute = enumField
|
||||
.GetCustomAttributes(typeof(DescriptionAttribute), false)
|
||||
.OfType<DescriptionAttribute>()
|
||||
.FirstOrDefault();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(descriptionAttribute?.Description))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return descriptionAttribute.Description;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the identification number of a setting from its known identification number
|
||||
/// </summary>
|
||||
/// <param name="knownSettingId">The known setting identification number.</param>
|
||||
/// <returns>The setting identification number.</returns>
|
||||
public static uint GetSettingId(KnownSettingId knownSettingId)
|
||||
{
|
||||
return (uint) knownSettingId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a setting is known by this library.
|
||||
/// </summary>
|
||||
/// <param name="settingId">The setting identification number.</param>
|
||||
/// <returns>true if setting is known by this library; otherwise false.</returns>
|
||||
public static bool IsSettingKnown(uint settingId)
|
||||
{
|
||||
return Enum.IsDefined(typeof(KnownSettingId), settingId);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
try
|
||||
{
|
||||
var settingName = Name;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(settingName))
|
||||
{
|
||||
return settingName;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore;
|
||||
}
|
||||
|
||||
return $"#{SettingId:X}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to resolve the name of a known value using its actual value
|
||||
/// </summary>
|
||||
/// <param name="value">The actual value</param>
|
||||
/// <returns>The name of the known value member.</returns>
|
||||
public string ResolveKnownValueName(object value)
|
||||
{
|
||||
if (!IsKnown)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var valueType = KnownValueType;
|
||||
|
||||
if (valueType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (valueType.IsEnum)
|
||||
{
|
||||
return Enum.GetName(valueType, value);
|
||||
}
|
||||
|
||||
var comparerType = typeof(EqualityComparer<>).MakeGenericType(value.GetType());
|
||||
var comparer = comparerType.GetProperty(nameof(EqualityComparer<object>.Default))?.GetValue(null);
|
||||
|
||||
if (!(comparer is IEqualityComparer equalityComparer))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return valueType.GetFields()
|
||||
.FirstOrDefault(info =>
|
||||
info.IsStatic &&
|
||||
equalityComparer.Equals(info.GetValue(null), value)
|
||||
)?.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AmbientOcclusionMode : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
Low = 0x1,
|
||||
|
||||
Medium = 0x2,
|
||||
|
||||
High = 0x3,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AmbientOcclusionModeActive : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
Enabled = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AnisotropicModeLevel : uint
|
||||
{
|
||||
Mask = 0xFFFF,
|
||||
|
||||
NonePoint = 0x0,
|
||||
|
||||
NoneLinear = 0x1,
|
||||
|
||||
Maximum = 0x10,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AnisotropicModeSelector : uint
|
||||
{
|
||||
Mask = 0xF,
|
||||
|
||||
Application = 0x0,
|
||||
|
||||
User = 0x1,
|
||||
|
||||
Condition = 0x2,
|
||||
|
||||
Maximum = 0x2,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AnselAllow : uint
|
||||
{
|
||||
Disallowed = 0x0,
|
||||
|
||||
Allowed = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AnselEnable : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AnselWhiteListed : uint
|
||||
{
|
||||
Disallowed = 0x0,
|
||||
|
||||
Allowed = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingBehaviorFlags : uint
|
||||
{
|
||||
None = 0x0,
|
||||
|
||||
TreatOverrideAsApplicationControlled = 0x1,
|
||||
|
||||
TreatOverrideAsEnhance = 0x2,
|
||||
|
||||
DisableOverride = 0x3,
|
||||
|
||||
TreatEnhanceAsApplicationControlled = 0x4,
|
||||
|
||||
TreatEnhanceAsOverride = 0x8,
|
||||
|
||||
DisableEnhance = 0xC,
|
||||
|
||||
MapVCAAToMultiSampling = 0x10000,
|
||||
|
||||
SLIDisableTransparencySupersampling = 0x20000,
|
||||
|
||||
DisableCplaa = 0x40000,
|
||||
|
||||
SkipRTDIMCheckForEnhance = 0x80000,
|
||||
|
||||
DisableSLIAntiAliasing = 0x100000,
|
||||
|
||||
Default = 0x0,
|
||||
|
||||
AntiAliasingRTBPPDIV4 = 0xF0000000,
|
||||
|
||||
AntiAliasingRTBPPDIV4Shift = 0x1C,
|
||||
|
||||
NonAntiAliasingRTBPPDIV4 = 0xF000000,
|
||||
|
||||
NonAntiAliasingRTBPPDIV4Shift = 0x18,
|
||||
|
||||
Mask = 0xFF1F000F
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingModeAlphaToCoverage : uint
|
||||
{
|
||||
ModeMask = 0x4,
|
||||
|
||||
ModeOff = 0x0,
|
||||
|
||||
ModeOn = 0x4,
|
||||
|
||||
ModeMaximum = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingModeGammaCorrection : uint
|
||||
{
|
||||
Mask = 0x3,
|
||||
|
||||
Off = 0x0,
|
||||
|
||||
OnIfFOS = 0x1,
|
||||
|
||||
OnAlways = 0x2,
|
||||
|
||||
Maximum = 0x2,
|
||||
|
||||
Default = 0x0,
|
||||
|
||||
DefaultTesla = 0x2,
|
||||
|
||||
DefaultFermi = 0x2
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingModeMethod : uint
|
||||
{
|
||||
None = 0x0,
|
||||
|
||||
SuperSample2XHorizontal = 0x1,
|
||||
|
||||
SuperSample2XVertical = 0x2,
|
||||
|
||||
SuperSample15X15 = 0x2,
|
||||
|
||||
Free0X03 = 0x3,
|
||||
|
||||
Free0X04 = 0x4,
|
||||
|
||||
SuperSample4X = 0x5,
|
||||
|
||||
SuperSample4XBias = 0x6,
|
||||
|
||||
SuperSample4XGaussian = 0x7,
|
||||
|
||||
Free0X08 = 0x8,
|
||||
|
||||
Free0X09 = 0x9,
|
||||
|
||||
SuperSample9X = 0xA,
|
||||
|
||||
SuperSample9XBias = 0xB,
|
||||
|
||||
SuperSample16X = 0xC,
|
||||
|
||||
SuperSample16XBias = 0xD,
|
||||
|
||||
MultiSample2XDiagonal = 0xE,
|
||||
|
||||
MultiSample2XQuincunx = 0xF,
|
||||
|
||||
MultiSample4X = 0x10,
|
||||
|
||||
Free0X11 = 0x11,
|
||||
|
||||
MultiSample4XGaussian = 0x12,
|
||||
|
||||
MixedSample4XSkewed4Tap = 0x13,
|
||||
|
||||
Free0X14 = 0x14,
|
||||
|
||||
Free0X15 = 0x15,
|
||||
|
||||
MixedSample6X = 0x16,
|
||||
|
||||
MixedSample6XSkewed6Tap = 0x17,
|
||||
|
||||
MixedSample8X = 0x18,
|
||||
|
||||
MixedSample8XSkewed8Tap = 0x19,
|
||||
|
||||
MixedSample16X = 0x1A,
|
||||
|
||||
MultiSample4XGamma = 0x1B,
|
||||
|
||||
MultiSample16X = 0x1C,
|
||||
|
||||
VCAA32X8V24 = 0x1D,
|
||||
|
||||
CorruptionCheck = 0x1E,
|
||||
|
||||
_6XCT = 0x1F,
|
||||
|
||||
MultiSample2XDiagonalGamma = 0x20,
|
||||
|
||||
SuperSample4XGamma = 0x21,
|
||||
|
||||
MultiSample4XFosgamma = 0x22,
|
||||
|
||||
MultiSample2XDiagonalFosgamma = 0x23,
|
||||
|
||||
SuperSample4XFosgamma = 0x24,
|
||||
|
||||
MultiSample8X = 0x25,
|
||||
|
||||
VCAA8X4V4 = 0x26,
|
||||
|
||||
VCAA16X4V12 = 0x27,
|
||||
|
||||
VCAA16X8V8 = 0x28,
|
||||
|
||||
MixedSample32X = 0x29,
|
||||
|
||||
SuperVCAA64X4V12 = 0x2A,
|
||||
|
||||
SuperVCAA64X8V8 = 0x2B,
|
||||
|
||||
MixedSample64X = 0x2C,
|
||||
|
||||
MixedSample128X = 0x2D,
|
||||
|
||||
Count = 0x2E,
|
||||
|
||||
MethodMask = 0xFFFF,
|
||||
|
||||
MethodMaximum = 0xF1C57815,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingModeReplay : uint
|
||||
{
|
||||
SamplesMask = 0x70,
|
||||
|
||||
SamplesOne = 0x0,
|
||||
|
||||
SamplesTwo = 0x10,
|
||||
|
||||
SamplesFour = 0x20,
|
||||
|
||||
SamplesEight = 0x30,
|
||||
|
||||
SamplesMaximum = 0x30,
|
||||
|
||||
ModeMask = 0xF,
|
||||
|
||||
ModeOff = 0x0,
|
||||
|
||||
ModeAlphaTest = 0x1,
|
||||
|
||||
ModePixelKill = 0x2,
|
||||
|
||||
ModeDynamicBranch = 0x4,
|
||||
|
||||
ModeOptimal = 0x4,
|
||||
|
||||
ModeAll = 0x8,
|
||||
|
||||
ModeMaximum = 0xF,
|
||||
|
||||
Transparency = 0x23,
|
||||
|
||||
DisAllowTraa = 0x100,
|
||||
|
||||
TransparencyDefault = 0x0,
|
||||
|
||||
TransparencyDefaultTesla = 0x0,
|
||||
|
||||
TransparencyDefaultFermi = 0x0,
|
||||
|
||||
Mask = 0x17F,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingModeSelector : uint
|
||||
{
|
||||
Mask = 0x3,
|
||||
|
||||
ApplicationControl = 0x0,
|
||||
|
||||
Override = 0x1,
|
||||
|
||||
Enhance = 0x2,
|
||||
|
||||
Maximum = 0x2,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AntiAliasingModeSelectorSLIAntiAliasing : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
Enabled = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ApplicationProfileNotificationTimeOut : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
NineSeconds = 0x9,
|
||||
|
||||
FifteenSeconds = 0xF,
|
||||
|
||||
ThirtySeconds = 0x1E,
|
||||
|
||||
OneMinute = 0x3C,
|
||||
|
||||
TwoMinutes = 0x78,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum AutoLODBiasAdjust : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum BatteryBoost : uint
|
||||
{
|
||||
Minimum = 0x1,
|
||||
|
||||
Maximum = 0xFF,
|
||||
|
||||
Enabled = 0x10000000,
|
||||
|
||||
Disabled = 0x0,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public static class CUDAExcludedGPUs
|
||||
{
|
||||
public const string Default = "none";
|
||||
public const string None = "none";
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ControlPanelHiddenProfile : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
Enabled = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public static class D3DOpenGLGPUMaximumPower
|
||||
{
|
||||
public const string Default = "0";
|
||||
public const string DefaultPower = "0";
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ExportPerformanceCounters : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ExportPerformanceCountersDX9Only : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum FXAAAllow : uint
|
||||
{
|
||||
Disallowed = 0x0,
|
||||
|
||||
Allowed = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum FXAAEnable : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum FXAAIndicatorEnable : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum LODBiasAdjust : uint
|
||||
{
|
||||
Minimum = 0xFFFFFF80,
|
||||
|
||||
Maximum = 0x80,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum MCSFRShowSplit : uint
|
||||
{
|
||||
Disabled = 0x34534064,
|
||||
|
||||
Enabled = 0x24545582,
|
||||
|
||||
Default = 0x34534064
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum MaxwellBSampleInterleave : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum NvidiaQualityUpScaling : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLAntiAliasingLineGamma : uint
|
||||
{
|
||||
Disabled = 0x10,
|
||||
|
||||
Enabled = 0x23,
|
||||
|
||||
Minimum = 0x1,
|
||||
|
||||
Maximum = 0x64,
|
||||
|
||||
Default = 0x10
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLDeepColorScanOut : uint
|
||||
{
|
||||
Disable = 0x0,
|
||||
|
||||
Enable = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLDefaultSwapInterval : uint
|
||||
{
|
||||
Tear = 0x0,
|
||||
|
||||
VSyncOne = 0x1,
|
||||
|
||||
VSync = 0x1,
|
||||
|
||||
ValueMask = 0xFFFF,
|
||||
|
||||
ForceMask = 0xF0000000,
|
||||
|
||||
ForceOff = 0xF0000000,
|
||||
|
||||
ForceOn = 0x10000000,
|
||||
|
||||
ApplicationControlled = 0x0,
|
||||
|
||||
Disable = 0xFFFFFFFF,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLDefaultSwapIntervalFractional : uint
|
||||
{
|
||||
ZeroScanLines = 0x0,
|
||||
|
||||
OneFullFrameOfScanLines = 0x64,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLDefaultSwapIntervalSign : uint
|
||||
{
|
||||
Positive = 0x0,
|
||||
|
||||
Negative = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLEventLogSeverityThreshold : uint
|
||||
{
|
||||
Disable = 0x0,
|
||||
|
||||
Critical = 0x1,
|
||||
|
||||
Warning = 0x2,
|
||||
|
||||
Information = 0x3,
|
||||
|
||||
All = 0x4,
|
||||
|
||||
Default = 0x4
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLForceBlit : uint
|
||||
{
|
||||
On = 0x1,
|
||||
|
||||
Off = 0x0,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLForceStereo : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public static class OpenGLImplicitGPUAffinity
|
||||
{
|
||||
public const string AutoSelect = "autoselect";
|
||||
|
||||
public const string Default = "autoselect";
|
||||
public const string EnvironmentVariable = "OGL_DEFAULT_RENDERING_GPU";
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLOverlayPixelType : uint
|
||||
{
|
||||
None = 0x0,
|
||||
|
||||
CI = 0x1,
|
||||
|
||||
RGBA = 0x2,
|
||||
|
||||
CIAndRGBA = 0x3,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLOverlaySupport : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
ForceSoftware = 0x2,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLQualityEnhancements : uint
|
||||
{
|
||||
HighQuality = 0xFFFFFFF6,
|
||||
|
||||
Quality = 0x0,
|
||||
|
||||
Performance = 0xA,
|
||||
|
||||
HighPerformance = 0x14,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLSLIMulticast : uint
|
||||
{
|
||||
Disable = 0x0,
|
||||
|
||||
Enable = 0x1,
|
||||
|
||||
ForceDisable = 0x2,
|
||||
|
||||
AllowMosaic = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLSingleBackDepthBuffer : uint
|
||||
{
|
||||
Disable = 0x0,
|
||||
|
||||
Enable = 0x1,
|
||||
|
||||
UseHardwareDefault = 0xFFFFFFFF,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLTMONLevel : uint
|
||||
{
|
||||
Disable = 0x0,
|
||||
|
||||
Critical = 0x1,
|
||||
|
||||
Warning = 0x2,
|
||||
|
||||
Information = 0x3,
|
||||
|
||||
Most = 0x4,
|
||||
|
||||
Verbose = 0x5,
|
||||
|
||||
Default = 0x4
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLThreadControl : uint
|
||||
{
|
||||
Enable = 0x1,
|
||||
|
||||
Disable = 0x2,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OpenGLTripleBuffer : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
Enabled = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum OptimusMaximumAntiAliasing : uint
|
||||
{
|
||||
Minimum = 0x0,
|
||||
|
||||
Maximum = 0x10,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateFrameRateLimiter : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
FPS20 = 0x14,
|
||||
|
||||
FPS30 = 0x1E,
|
||||
|
||||
FPS40 = 0x28,
|
||||
|
||||
Fpsmask = 0xFF,
|
||||
|
||||
NoAlign = 0x4000,
|
||||
|
||||
BBQM = 0x8000,
|
||||
|
||||
LowerFPSToAlign = 0x20000,
|
||||
|
||||
ForceVSyncOff = 0x40000,
|
||||
|
||||
GpsWeb = 0x80000,
|
||||
|
||||
Disallowed = 0x200000,
|
||||
|
||||
UseCPUWait = 0x400000,
|
||||
|
||||
NoLagOffset = 0x800000,
|
||||
|
||||
Accurate = 0x10000000,
|
||||
|
||||
AllowWindowed = 0x20000000,
|
||||
|
||||
ForceOn = 0x40000000,
|
||||
|
||||
Enabled = 0x80000000,
|
||||
|
||||
OpenGLRemoteDesktop = 0xE000003C,
|
||||
|
||||
Mask = 0xF0EEC0FF,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateFrameRateLimiter2Control : uint
|
||||
{
|
||||
DelayCE = 0x0,
|
||||
|
||||
Delay3D = 0x1,
|
||||
|
||||
AvoidNoop = 0x2,
|
||||
|
||||
DelayCEPresent3D = 0x8,
|
||||
|
||||
AllowAllMaxwell = 0x10,
|
||||
|
||||
AllowAll = 0x20,
|
||||
|
||||
ForceOff = 0x40,
|
||||
|
||||
EnableVCE = 0x80,
|
||||
|
||||
DefaultForGM10X = 0x11,
|
||||
|
||||
Default = 0x88
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateFrameRateLimiterGpsControl : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
DecreaseFilterMask = 0x1FF,
|
||||
|
||||
PauseTimeMask = 0xFE00,
|
||||
|
||||
PauseTimeShift = 0x9,
|
||||
|
||||
TargetRenderTimeMask = 0xFF0000,
|
||||
|
||||
TargetRenderTimeShift = 0x10,
|
||||
|
||||
PerformanceStepSizeMask = 0x1F000000,
|
||||
|
||||
PerformanceStepSizeShift = 0x18,
|
||||
|
||||
IncreaseFilterMask = 0xE0000000,
|
||||
|
||||
IncreaseFilterShift = 0x1D,
|
||||
|
||||
OptimalSetting = 0x4A5A3219,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateFrameRateMonitorControl : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
ThresholdPctMask = 0xFF,
|
||||
|
||||
MovingAverageXMask = 0xF00,
|
||||
|
||||
MovingAverageXShift = 0x8,
|
||||
|
||||
EnableFineGrained = 0x400000,
|
||||
|
||||
EnableOnVSync = 0x800000,
|
||||
|
||||
VSyncOffsetMask = 0xF000,
|
||||
|
||||
VSyncOffsetShift = 0xC,
|
||||
|
||||
FPSUseFrl = 0x0,
|
||||
|
||||
FPS30 = 0x1E000000,
|
||||
|
||||
FPS60 = 0x3C000000,
|
||||
|
||||
FPSMask = 0xFF000000,
|
||||
|
||||
FPSShift = 0x18,
|
||||
|
||||
OptimalSetting = 0x364,
|
||||
|
||||
VSyncOptimalSetting = 0x80F364,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateShaderDiskCache : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateTextureFilteringAnisotropicOptimization : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateTextureFilteringBiLinearInAnisotropic : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateTextureFilteringDisableTrilinearSlope : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PerformanceStateTextureFilteringNoNegativeLODBias : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PhysxIndicator : uint
|
||||
{
|
||||
Disabled = 0x34534064,
|
||||
|
||||
Enabled = 0x24545582,
|
||||
|
||||
Default = 0x34534064
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PreRenderLimit : uint
|
||||
{
|
||||
Minimum = 0x0,
|
||||
|
||||
Maximum = 0xFF,
|
||||
|
||||
ApplicationControlled = 0x0,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PreferredPerformanceState : uint
|
||||
{
|
||||
Adaptive = 0x0,
|
||||
|
||||
PreferMaximum = 0x1,
|
||||
|
||||
DriverControlled = 0x2,
|
||||
|
||||
PreferConsistentPerformance = 0x3,
|
||||
|
||||
PreferMinimum = 0x4,
|
||||
|
||||
OptimalPower = 0x5,
|
||||
|
||||
Minimum = 0x0,
|
||||
|
||||
Maximum = 0x5,
|
||||
|
||||
Default = 0x5
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum PreventUiAnisotropicOverride : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum QualityEnhancements : uint
|
||||
{
|
||||
HighQuality = 0xFFFFFFF6,
|
||||
|
||||
Quality = 0x0,
|
||||
|
||||
Performance = 0xA,
|
||||
|
||||
HighPerformance = 0x14,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum RefreshRateOverride : uint
|
||||
{
|
||||
ApplicationControlled = 0x0,
|
||||
|
||||
HighestAvailable = 0x1,
|
||||
|
||||
LowLatencyRefreshRateMask = 0xFF0,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SLIGPUCount : uint
|
||||
{
|
||||
AutoSelect = 0x0,
|
||||
|
||||
One = 0x1,
|
||||
|
||||
Two = 0x2,
|
||||
|
||||
Three = 0x3,
|
||||
|
||||
Four = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SLIPredefinedGPUCount : uint
|
||||
{
|
||||
AutoSelect = 0x0,
|
||||
|
||||
One = 0x1,
|
||||
|
||||
Two = 0x2,
|
||||
|
||||
Three = 0x3,
|
||||
|
||||
Four = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SLIPredefinedGPUCountDX10 : uint
|
||||
{
|
||||
AutoSelect = 0x0,
|
||||
|
||||
One = 0x1,
|
||||
|
||||
Two = 0x2,
|
||||
|
||||
Three = 0x3,
|
||||
|
||||
Four = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SLIPredefinedMode : uint
|
||||
{
|
||||
AutoSelect = 0x0,
|
||||
|
||||
ForceSingle = 0x1,
|
||||
|
||||
ForceAFR = 0x2,
|
||||
|
||||
ForceAFR2 = 0x3,
|
||||
|
||||
ForceSFR = 0x4,
|
||||
|
||||
ForceAFROfSFRFallback3AFR = 0x5,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SLIPredefinedModeDX10 : uint
|
||||
{
|
||||
AutoSelect = 0x0,
|
||||
|
||||
ForceSingle = 0x1,
|
||||
|
||||
ForceAFR = 0x2,
|
||||
|
||||
ForceAFR2 = 0x3,
|
||||
|
||||
ForceSFR = 0x4,
|
||||
|
||||
ForceAFROfSFRFallback3AFR = 0x5,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SLIRenderingMode : uint
|
||||
{
|
||||
AutoSelect = 0x0,
|
||||
|
||||
ForceSingle = 0x1,
|
||||
|
||||
ForceAFR = 0x2,
|
||||
|
||||
ForceAFR2 = 0x3,
|
||||
|
||||
ForceSFR = 0x4,
|
||||
|
||||
ForceAFROfSFRFallback3AFR = 0x5,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SetPowerThrottleForPCIeCompliance : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum SetVABData : uint
|
||||
{
|
||||
Zero = 0x0,
|
||||
|
||||
UIntOne = 0x1,
|
||||
|
||||
FloatOne = 0x3F800000,
|
||||
|
||||
FloatPosInf = 0x7F800000,
|
||||
|
||||
FloatNan = 0x7FC00000,
|
||||
|
||||
UseAPIDefaults = 0xFFFFFFFF,
|
||||
|
||||
Default = 0xFFFFFFFF
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ShimMCCOMPAT : uint
|
||||
{
|
||||
Integrated = 0x0,
|
||||
|
||||
Enable = 0x1,
|
||||
|
||||
UserEditable = 0x2,
|
||||
|
||||
Mask = 0x3,
|
||||
|
||||
VideoMask = 0x4,
|
||||
|
||||
VaryingBit = 0x8,
|
||||
|
||||
AutoSelect = 0x10,
|
||||
|
||||
OverrideBit = 0x80000000,
|
||||
|
||||
Default = 0x10
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ShimRenderingMode : uint
|
||||
{
|
||||
Integrated = 0x0,
|
||||
|
||||
Enable = 0x1,
|
||||
|
||||
UserEditable = 0x2,
|
||||
|
||||
Mask = 0x3,
|
||||
|
||||
VideoMask = 0x4,
|
||||
|
||||
VaryingBit = 0x8,
|
||||
|
||||
AutoSelect = 0x10,
|
||||
|
||||
OverrideBit = 0x80000000,
|
||||
|
||||
Default = 0x10
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum ShimRenderingOptions : uint
|
||||
{
|
||||
DefaultRenderingMode = 0x0,
|
||||
|
||||
DisableAsyncPresent = 0x1,
|
||||
|
||||
EHShellDetect = 0x2,
|
||||
|
||||
FlashplayerHostDetect = 0x4,
|
||||
|
||||
VideoDRMApplicationDetect = 0x8,
|
||||
|
||||
IgnoreOverrides = 0x10,
|
||||
|
||||
Reserved1 = 0x20,
|
||||
|
||||
EnableDWMAsyncPresent = 0x40,
|
||||
|
||||
Reserved2 = 0x80,
|
||||
|
||||
AllowInheritance = 0x100,
|
||||
|
||||
DisableWrappers = 0x200,
|
||||
|
||||
DisableDxgiWrappers = 0x400,
|
||||
|
||||
PruneUnsupportedFormats = 0x800,
|
||||
|
||||
EnableAlphaFormat = 0x1000,
|
||||
|
||||
IGPUTranscoding = 0x2000,
|
||||
|
||||
DisableCUDA = 0x4000,
|
||||
|
||||
AllowCpCapabilitiesForVideo = 0x8000,
|
||||
|
||||
IGPUTranscodingFwdOptimus = 0x10000,
|
||||
|
||||
DisableDuringSecureBoot = 0x20000,
|
||||
|
||||
InvertForQuadro = 0x40000,
|
||||
|
||||
InvertForMSHybrid = 0x80000,
|
||||
|
||||
RegisterProcessEnableGold = 0x100000,
|
||||
|
||||
HandleWindowedModePerformanceOptimal = 0x200000,
|
||||
|
||||
HandleWin7AsyncRuntimeBug = 0x400000,
|
||||
|
||||
ExplicitAdapterOptedByApplication = 0x800000,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRPreRenderLimit : uint
|
||||
{
|
||||
Minimum = 0x0,
|
||||
|
||||
Maximum = 0xFF,
|
||||
|
||||
ApplicationControlled = 0x0,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRRApplicationOverride : uint
|
||||
{
|
||||
Allow = 0x0,
|
||||
|
||||
ForceOff = 0x1,
|
||||
|
||||
DisAllow = 0x2,
|
||||
|
||||
ULMB = 0x3,
|
||||
|
||||
FixedRefresh = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRRApplicationOverrideRequestState : uint
|
||||
{
|
||||
Allow = 0x0,
|
||||
|
||||
ForceOff = 0x1,
|
||||
|
||||
DisAllow = 0x2,
|
||||
|
||||
ULMB = 0x3,
|
||||
|
||||
FixedRefresh = 0x4,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRRFeatureIndicator : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
Enabled = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRRMode : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
FullScreenOnly = 0x1,
|
||||
|
||||
FullScreenAndWindowed = 0x2,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRROverlayIndicator : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
Enabled = 0x1,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VRRRequestState : uint
|
||||
{
|
||||
Disabled = 0x0,
|
||||
|
||||
FullScreenOnly = 0x1,
|
||||
|
||||
FullScreenAndWindowed = 0x2,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VSyncBehaviorFlags : uint
|
||||
{
|
||||
None = 0x0,
|
||||
|
||||
Default = 0x0,
|
||||
|
||||
IgnoreFlipIntervalMultiple = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VSyncMode : uint
|
||||
{
|
||||
Passive = 0x60925292,
|
||||
|
||||
ForceOff = 0x8416747,
|
||||
|
||||
ForceOn = 0x47814940,
|
||||
|
||||
FlipInterval2 = 0x32610244,
|
||||
|
||||
FlipInterval3 = 0x71271021,
|
||||
|
||||
FlipInterval4 = 0x13245256,
|
||||
|
||||
Virtual = 0x18888888,
|
||||
|
||||
Default = 0x60925292
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VSyncSmoothAFR : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VSyncTearControl : uint
|
||||
{
|
||||
Disable = 0x96861077,
|
||||
|
||||
Enable = 0x99941284,
|
||||
|
||||
Default = 0x96861077
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum VSyncVRRControl : uint
|
||||
{
|
||||
Disable = 0x0,
|
||||
|
||||
Enable = 0x1,
|
||||
|
||||
NotSupported = 0x9F95128E,
|
||||
|
||||
Default = 0x1
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum WKSAPIStereoEyesExchange : uint
|
||||
{
|
||||
Off = 0x0,
|
||||
|
||||
On = 0x1,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum WKSAPIStereoMode : uint
|
||||
{
|
||||
ShutterGlasses = 0x0,
|
||||
|
||||
VerticalInterlaced = 0x1,
|
||||
|
||||
Twinview = 0x2,
|
||||
|
||||
NV17ShutterGlassesAuto = 0x3,
|
||||
|
||||
NV17ShutterGlassesDAC0 = 0x4,
|
||||
|
||||
NV17ShutterGlassesDAC1 = 0x5,
|
||||
|
||||
ColorLine = 0x6,
|
||||
|
||||
ColorInterleaved = 0x7,
|
||||
|
||||
Anaglyph = 0x8,
|
||||
|
||||
HorizontalInterlaced = 0x9,
|
||||
|
||||
SideField = 0xA,
|
||||
|
||||
SubField = 0xB,
|
||||
|
||||
CheckerBoard = 0xC,
|
||||
|
||||
InverseCheckerBoard = 0xD,
|
||||
|
||||
TridelitySL = 0xE,
|
||||
|
||||
TridelityMV = 0xF,
|
||||
|
||||
SeeFront = 0x10,
|
||||
|
||||
StereoMirror = 0x11,
|
||||
|
||||
FrameSequential = 0x12,
|
||||
|
||||
AutodetectPassiveMode = 0x13,
|
||||
|
||||
AegisDTFrameSequential = 0x14,
|
||||
|
||||
OEMEmitterFrameSequential = 0x15,
|
||||
|
||||
DPInBand = 0x16,
|
||||
|
||||
UseHardwareDefault = 0xFFFFFFFF,
|
||||
|
||||
DefaultGL = 0x3,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace NvAPIWrapper.DRS.SettingValues
|
||||
{
|
||||
#pragma warning disable 1591
|
||||
public enum WKSMemoryAllocationPolicy : uint
|
||||
{
|
||||
AsNeeded = 0x0,
|
||||
|
||||
ModeratePreAllocation = 0x1,
|
||||
|
||||
AggressivePreAllocation = 0x2,
|
||||
|
||||
Default = 0x0
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user