mirror of
https://github.com/Orbmu2k/nvidiaProfileInspector.git
synced 2025-12-24 07:28:08 -05:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
985af53a27 | ||
|
|
c38992cd7c | ||
|
|
53ead6e9ef | ||
|
|
f35c4cda03 | ||
|
|
a0207baafb | ||
|
|
689ad42bce | ||
|
|
0a7003519a | ||
|
|
fa01928689 | ||
|
|
9de53ac04d | ||
|
|
7b917d9b11 | ||
|
|
8ac48c2928 | ||
|
|
84e138c1ae | ||
|
|
e3ff6d42ac | ||
|
|
de9f86e878 | ||
|
|
8e0360149c | ||
|
|
bf8aa6c124 | ||
|
|
75e729298d | ||
|
|
5ac60d82ca | ||
|
|
b2306bb310 | ||
|
|
f4e2a2fe69 | ||
|
|
ecbc27200a | ||
|
|
06559a5512 | ||
|
|
04202e43c7 | ||
|
|
cde038f53b | ||
|
|
1980707c13 | ||
|
|
f5e4d76388 | ||
|
|
89957fcbae | ||
|
|
0cbafd18a3 | ||
|
|
590125369d | ||
|
|
5a20139f8b | ||
|
|
a6fde2f6f8 | ||
|
|
d5cae1000f | ||
|
|
73dbbbd66c | ||
|
|
64f626e8a0 | ||
|
|
f62aa86ccc | ||
|
|
345444619c | ||
|
|
50006f114a | ||
|
|
a3b524e7d9 | ||
|
|
109fdd066a | ||
|
|
9115ffa4cc | ||
|
|
b4f65906d9 | ||
|
|
c0c37cbfbb | ||
|
|
e548c384ec | ||
|
|
b043a0cce6 | ||
|
|
7eca55a7a1 | ||
|
|
332153bc23 | ||
|
|
8ff77c1f07 | ||
|
|
801fa76467 | ||
|
|
a40527f8de |
@@ -13,8 +13,10 @@ namespace nspector.Common.CustomSettings
|
||||
public string HexSettingId { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string GroupName { get; set; }
|
||||
public string AlternateNames { get; set; }
|
||||
public string OverrideDefault { get; set; }
|
||||
public float MinRequiredDriverVersion { get; set; }
|
||||
public float MaxRequiredDriverVersion { get; set; }
|
||||
public bool Hidden { get; set; }
|
||||
public bool HasConstraints { get; set; }
|
||||
public string DataType { get; set; }
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace nspector.Common
|
||||
public static readonly DrsScannerService ScannerService;
|
||||
public static readonly DrsDecrypterService DecrypterService;
|
||||
|
||||
public static bool IsExternalCustomSettings { get; private set; } = false;
|
||||
|
||||
static DrsServiceLocator()
|
||||
{
|
||||
CustomSettings = LoadCustomSettings();
|
||||
@@ -31,7 +33,18 @@ namespace nspector.Common
|
||||
string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\CustomSettingNames.xml";
|
||||
|
||||
if (File.Exists(csnDefaultPath))
|
||||
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
|
||||
{
|
||||
try
|
||||
{
|
||||
var externalSettings = CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
|
||||
IsExternalCustomSettings = true;
|
||||
return externalSettings;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return CustomSettingNames.FactoryLoadFromString(Properties.Resources.CustomSettingNames);
|
||||
}
|
||||
}
|
||||
else
|
||||
return CustomSettingNames.FactoryLoadFromString(Properties.Resources.CustomSettingNames);
|
||||
}
|
||||
@@ -40,8 +53,12 @@ namespace nspector.Common
|
||||
{
|
||||
string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Reference.xml";
|
||||
|
||||
if (File.Exists(csnDefaultPath))
|
||||
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
|
||||
try
|
||||
{
|
||||
if (File.Exists(csnDefaultPath))
|
||||
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -106,6 +106,17 @@ namespace nspector.Common
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetAlternateNames(uint settingId)
|
||||
{
|
||||
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
|
||||
{
|
||||
var altNames = service.Service.GetAlternateNames(settingId);
|
||||
if (altNames != null)
|
||||
return altNames;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private uint GetDwordDefaultValue(uint settingId)
|
||||
{
|
||||
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
|
||||
@@ -301,13 +312,12 @@ namespace nspector.Common
|
||||
if (groupName == null)
|
||||
groupName = GetLegacyGroupName(settingId, settingName);
|
||||
|
||||
|
||||
|
||||
var result = new SettingMeta()
|
||||
{
|
||||
SettingType = settingType,
|
||||
SettingName = settingName,
|
||||
GroupName = groupName,
|
||||
AlternateNames = GetAlternateNames(settingId),
|
||||
|
||||
IsApiExposed = GetIsApiExposed(settingId),
|
||||
IsSettingHidden = GetIsSettingHidden(settingId),
|
||||
@@ -351,6 +361,7 @@ namespace nspector.Common
|
||||
SettingName = settingMeta.SettingName,
|
||||
SettingType = settingMeta.SettingType,
|
||||
GroupName = settingMeta.GroupName,
|
||||
AlternateNames = settingMeta.AlternateNames,
|
||||
IsApiExposed = settingMeta.IsApiExposed,
|
||||
IsSettingHidden = settingMeta.IsSettingHidden,
|
||||
Description = settingMeta.Description,
|
||||
@@ -421,7 +432,10 @@ namespace nspector.Common
|
||||
private bool GetIsSettingHidden(uint settingId)
|
||||
{
|
||||
var csnMeta = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.CustomSettings);
|
||||
return (csnMeta != null && ((CustomSettingMetaService)csnMeta.Service).IsSettingHidden(settingId));
|
||||
var refMeta = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.ReferenceSettings);
|
||||
|
||||
return (csnMeta != null && ((CustomSettingMetaService)csnMeta.Service).IsSettingHidden(settingId)) ||
|
||||
refMeta != null && ((CustomSettingMetaService)refMeta.Service).IsSettingHidden(settingId);
|
||||
}
|
||||
|
||||
private string GetDescription(uint settingId)
|
||||
|
||||
@@ -51,6 +51,11 @@ namespace nspector.Common
|
||||
return fiDbInstaller.DirectoryName;
|
||||
}
|
||||
|
||||
string sys32Path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), @"drivers\NVIDIA Corporation\Drs\dbInstaller.exe");
|
||||
|
||||
if (File.Exists(sys32Path))
|
||||
return sys32Path;
|
||||
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
|
||||
@"NVIDIA Corporation\Drs");
|
||||
}
|
||||
@@ -141,6 +146,27 @@ namespace nspector.Common
|
||||
|
||||
}
|
||||
|
||||
public string GetProfileNameByExeName(string appName)
|
||||
{
|
||||
string profileName = string.Empty;
|
||||
|
||||
DrsSession((hSession) =>
|
||||
{
|
||||
var hProfile = FindApplicationByName(hSession, appName);
|
||||
if (hProfile != IntPtr.Zero)
|
||||
{
|
||||
var profile = GetProfileInfo(hSession, hProfile);
|
||||
|
||||
if (profile.isPredefined == 0 || profile.numOfApps > 0)
|
||||
{
|
||||
profileName = profile.profileName;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return profileName;
|
||||
}
|
||||
|
||||
public List<string> GetProfileNames(ref string baseProfileName)
|
||||
{
|
||||
var lstResult = new List<string>();
|
||||
@@ -471,6 +497,7 @@ namespace nspector.Common
|
||||
SettingId = setting.settingId,
|
||||
SettingText = settingMeta.SettingName,
|
||||
GroupName = settingMeta.GroupName,
|
||||
AlternateNames = settingMeta.AlternateNames,
|
||||
ValueRaw = valueRaw,
|
||||
ValueText = valueText,
|
||||
State = settingState,
|
||||
@@ -549,7 +576,7 @@ namespace nspector.Common
|
||||
});
|
||||
}
|
||||
|
||||
private string GetApplicationFingerprint(NVDRS_APPLICATION_V3 application)
|
||||
private string GetApplicationFingerprint(NVDRS_APPLICATION_V4 application)
|
||||
{
|
||||
return $"{application.appName}|{application.fileInFolder}|{application.userFriendlyName}|{application.launcher}";
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace nspector.Common
|
||||
{
|
||||
internal abstract class DrsSettingsServiceBase
|
||||
{
|
||||
public static readonly float DriverVersion = GetDriverVersionInternal();
|
||||
|
||||
protected DrsSettingsMetaService meta;
|
||||
protected DrsDecrypterService decrypter;
|
||||
@@ -22,11 +23,9 @@ namespace nspector.Common
|
||||
{
|
||||
meta = metaService;
|
||||
decrypter = decrpterService;
|
||||
DriverVersion = GetDriverVersionInternal();
|
||||
}
|
||||
|
||||
public readonly float DriverVersion;
|
||||
private float GetDriverVersionInternal()
|
||||
private static float GetDriverVersionInternal()
|
||||
{
|
||||
float result = 0f;
|
||||
uint sysDrvVersion = 0;
|
||||
@@ -215,9 +214,9 @@ namespace nspector.Common
|
||||
|
||||
protected void AddApplication(IntPtr hSession, IntPtr hProfile, string applicationName)
|
||||
{
|
||||
var newApp = new NVDRS_APPLICATION_V3()
|
||||
var newApp = new NVDRS_APPLICATION_V4()
|
||||
{
|
||||
version = nvw.NVDRS_APPLICATION_VER_V3,
|
||||
version = nvw.NVDRS_APPLICATION_VER_V4,
|
||||
appName = applicationName,
|
||||
};
|
||||
|
||||
@@ -227,7 +226,7 @@ namespace nspector.Common
|
||||
|
||||
}
|
||||
|
||||
protected void DeleteApplication(IntPtr hSession, IntPtr hProfile, NVDRS_APPLICATION_V3 application)
|
||||
protected void DeleteApplication(IntPtr hSession, IntPtr hProfile, NVDRS_APPLICATION_V4 application)
|
||||
{
|
||||
var caRes = nvw.DRS_DeleteApplicationEx(hSession, hProfile, ref application);
|
||||
if (caRes != NvAPI_Status.NVAPI_OK)
|
||||
@@ -285,16 +284,16 @@ namespace nspector.Common
|
||||
return settings.ToList();
|
||||
}
|
||||
|
||||
protected List<NVDRS_APPLICATION_V3> GetProfileApplications(IntPtr hSession, IntPtr hProfile)
|
||||
protected List<NVDRS_APPLICATION_V4> GetProfileApplications(IntPtr hSession, IntPtr hProfile)
|
||||
{
|
||||
uint appCount = 512;
|
||||
var apps = new NVDRS_APPLICATION_V3[512];
|
||||
apps[0].version = NvapiDrsWrapper.NVDRS_APPLICATION_VER_V3;
|
||||
var apps = new NVDRS_APPLICATION_V4[512];
|
||||
apps[0].version = NvapiDrsWrapper.NVDRS_APPLICATION_VER_V4;
|
||||
|
||||
var esRes = NvapiDrsWrapper.DRS_EnumApplications(hSession, hProfile, 0, ref appCount, ref apps);
|
||||
|
||||
if (esRes == NvAPI_Status.NVAPI_END_ENUMERATION)
|
||||
return new List<NVDRS_APPLICATION_V3>();
|
||||
return new List<NVDRS_APPLICATION_V4>();
|
||||
|
||||
if (esRes != NvAPI_Status.NVAPI_OK)
|
||||
throw new NvapiException("DRS_EnumApplications", esRes);
|
||||
@@ -302,6 +301,20 @@ namespace nspector.Common
|
||||
return apps.ToList();
|
||||
}
|
||||
|
||||
protected IntPtr FindApplicationByName(IntPtr hSession, string appName)
|
||||
{
|
||||
IntPtr hProfile = IntPtr.Zero;
|
||||
NVDRS_APPLICATION_V4 app = new NVDRS_APPLICATION_V4();
|
||||
app.version = NvapiDrsWrapper.NVDRS_APPLICATION_VER_V4;
|
||||
|
||||
var res = NvapiDrsWrapper.DRS_FindApplicationByName(hSession, new StringBuilder(appName), ref hProfile, ref app);
|
||||
|
||||
if (res != NvAPI_Status.NVAPI_OK)
|
||||
throw new NvapiException("DRS_FindApplicationByName", res);
|
||||
|
||||
return hProfile;
|
||||
}
|
||||
|
||||
protected void SaveSettings(IntPtr hSession)
|
||||
{
|
||||
var nvRes = nvw.DRS_SaveSettings(hSession);
|
||||
|
||||
125
nspector/Common/Helper/DlssHelper.cs
Normal file
125
nspector/Common/Helper/DlssHelper.cs
Normal file
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
namespace nspector.Common.Helper
|
||||
{
|
||||
public class IniParser
|
||||
{
|
||||
public Dictionary<string, Dictionary<string, string>> Data { get; } = new();
|
||||
|
||||
public void Load(string filePath)
|
||||
{
|
||||
using var reader = new StreamReader(filePath);
|
||||
string? line;
|
||||
string? currentSection = null;
|
||||
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
line = line.Trim();
|
||||
|
||||
// Skip empty lines and comments
|
||||
if (string.IsNullOrEmpty(line) || line.StartsWith(";") || line.StartsWith("#"))
|
||||
continue;
|
||||
|
||||
// Section
|
||||
if (line.StartsWith("[") && line.EndsWith("]"))
|
||||
{
|
||||
currentSection = line.Substring(1, line.Length - 2).Trim();
|
||||
if (!Data.ContainsKey(currentSection))
|
||||
Data[currentSection] = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
// Key=Value
|
||||
else if (currentSection != null && line.Contains('='))
|
||||
{
|
||||
int idx = line.IndexOf('=');
|
||||
var key = line.Substring(0, idx).Trim();
|
||||
var value = line.Substring(idx + 1).Trim();
|
||||
Data[currentSection][key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string? GetValue(string section, string key)
|
||||
{
|
||||
if (Data.TryGetValue(section, out var sectionDict) &&
|
||||
sectionDict.TryGetValue(key, out var value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<string> GetSections()
|
||||
{
|
||||
return Data.Keys.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public static class DlssHelper
|
||||
{
|
||||
private static Dictionary<string, Version> _ngxVersions = FetchVersions();
|
||||
|
||||
// Fetches latest versions installed in C:\ProgramData\NVIDIA\NGX\models\ folder
|
||||
private static Dictionary<string, Version> FetchVersions()
|
||||
{
|
||||
Dictionary<string, Version> versions = new Dictionary<string, Version>();
|
||||
|
||||
try
|
||||
{
|
||||
string ngxDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), @"NVIDIA\NGX\models\");
|
||||
string ngxConfigPath = Path.Combine(ngxDataPath, "nvngx_config.txt");
|
||||
if (!File.Exists(ngxConfigPath))
|
||||
return versions;
|
||||
|
||||
var ini = new IniParser();
|
||||
ini.Load(ngxConfigPath);
|
||||
|
||||
foreach (string section in ini.GetSections())
|
||||
{
|
||||
string versionStr = ini.GetValue(section, "app_E658700");
|
||||
if (string.IsNullOrEmpty(versionStr))
|
||||
continue;
|
||||
|
||||
Version ver = new Version(versionStr.Trim());
|
||||
|
||||
versions[section] = ver;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
versions.Clear();
|
||||
}
|
||||
|
||||
return versions;
|
||||
}
|
||||
|
||||
public static string GetSnippetLatestVersion(string snippet)
|
||||
{
|
||||
if (!_ngxVersions.ContainsKey(snippet))
|
||||
return "unknown";
|
||||
return "v" + _ngxVersions[snippet].ToString();
|
||||
}
|
||||
|
||||
public static string ReplaceDlssVersions(string str)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return str;
|
||||
|
||||
if (str.Contains("${DlssVersion}"))
|
||||
str = str.Replace("${DlssVersion}", DlssHelper.GetSnippetLatestVersion("dlss").ToString());
|
||||
|
||||
if (str.Contains("${DlssgVersion}"))
|
||||
str = str.Replace("${DlssgVersion}", DlssHelper.GetSnippetLatestVersion("dlssg").ToString());
|
||||
|
||||
if (str.Contains("${DlssdVersion}"))
|
||||
str = str.Replace("${DlssdVersion}", DlssHelper.GetSnippetLatestVersion("dlssd").ToString());
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
nspector/Common/Helper/GithubVersionHelper.cs
Normal file
70
nspector/Common/Helper/GithubVersionHelper.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace nspector.Common.Helper
|
||||
{
|
||||
public static class GithubVersionHelper
|
||||
{
|
||||
// Check latest release info (ignores pre-release versions)
|
||||
private const string _repoUrl = "https://api.github.com/repos/Orbmu2k/nvidiaProfileInspector/releases/latest";
|
||||
|
||||
public static async Task<bool> IsUpdateAvailableAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
|
||||
using var httpClient = new HttpClient();
|
||||
httpClient.Timeout = TimeSpan.FromSeconds(10);
|
||||
httpClient.DefaultRequestHeaders.Add("User-Agent", "nvidiaProfileInspector/" + currentVersion.ToString());
|
||||
|
||||
var response = await httpClient.GetAsync(_repoUrl);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
return false;
|
||||
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
var tagName = ExtractJsonString(content, "tag_name");
|
||||
|
||||
if (string.IsNullOrEmpty(tagName))
|
||||
return false;
|
||||
|
||||
var versionString = tagName.TrimStart('v').Trim();
|
||||
|
||||
if (Version.TryParse(versionString, out Version latestVersion))
|
||||
{
|
||||
return latestVersion > currentVersion;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static string ExtractJsonString(string json, string fieldName)
|
||||
{
|
||||
var pattern = $"\"{fieldName}\"\\s*:\\s*\"([^\"\\\\]*(\\\\.[^\"\\\\]*)*)\"";
|
||||
var match = Regex.Match(json, pattern);
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
var value = match.Groups[1].Value;
|
||||
value = value.Replace("\\\"", "\"");
|
||||
value = value.Replace("\\\\", "\\");
|
||||
value = value.Replace("\\n", "\n");
|
||||
value = value.Replace("\\r", "\r");
|
||||
value = value.Replace("\\t", "\t");
|
||||
return value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -9,13 +10,14 @@ namespace nspector.Common.Helper
|
||||
internal class InputBox
|
||||
{
|
||||
|
||||
internal static DialogResult Show(string title, string promptText, ref string value, List<string> invalidInputs, string mandatoryFormatRegExPattern, int maxLength)
|
||||
internal static DialogResult Show(string title, string promptText, ref string value, List<string> invalidInputs, string mandatoryFormatRegExPattern, int maxLength, bool allowExeBrowse = false)
|
||||
{
|
||||
var form = new Form();
|
||||
var label = new Label();
|
||||
var textBox = new TextBox();
|
||||
var buttonOk = new Button();
|
||||
var buttonCancel = new Button();
|
||||
var buttonBrowse = new Button();
|
||||
var imageBox = new PictureBox();
|
||||
|
||||
EventHandler textchanged = delegate (object sender, EventArgs e)
|
||||
@@ -43,10 +45,23 @@ namespace nspector.Common.Helper
|
||||
buttonOk.Enabled = true;
|
||||
};
|
||||
|
||||
EventHandler buttonBrowse_Click = delegate (object sender, EventArgs e)
|
||||
{
|
||||
var openDialog = new OpenFileDialog();
|
||||
openDialog.DefaultExt = "*.exe";
|
||||
openDialog.Filter = "Application EXE Name|*.exe|Application Absolute Path|*.exe";
|
||||
|
||||
if (openDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string applicationName = new FileInfo(openDialog.FileName).Name;
|
||||
if (openDialog.FilterIndex == 2)
|
||||
applicationName = openDialog.FileName;
|
||||
textBox.Text = applicationName;
|
||||
}
|
||||
};
|
||||
|
||||
textBox.TextChanged += textchanged;
|
||||
|
||||
|
||||
form.Text = title;
|
||||
label.Text = promptText;
|
||||
textBox.Text = value;
|
||||
@@ -55,28 +70,47 @@ namespace nspector.Common.Helper
|
||||
|
||||
buttonOk.Text = "OK";
|
||||
buttonCancel.Text = "Cancel";
|
||||
buttonBrowse.Text = "Browse...";
|
||||
buttonOk.DialogResult = DialogResult.OK;
|
||||
buttonCancel.DialogResult = DialogResult.Cancel;
|
||||
|
||||
buttonOk.Enabled = false;
|
||||
|
||||
label.SetBounds(Dpi(9), Dpi(20), Dpi(372), Dpi(13));
|
||||
textBox.SetBounds(Dpi(12), Dpi(36), Dpi(352), Dpi(20));
|
||||
buttonOk.SetBounds(Dpi(228), Dpi(72), Dpi(75), Dpi(23));
|
||||
buttonCancel.SetBounds(Dpi(309), Dpi(72), Dpi(75), Dpi(23));
|
||||
textBox.SetBounds(Dpi(12), Dpi(44), Dpi(352), Dpi(20));
|
||||
buttonOk.SetBounds(Dpi(224), Dpi(72), Dpi(75), Dpi(23));
|
||||
buttonCancel.SetBounds(Dpi(305), Dpi(72), Dpi(75), Dpi(23));
|
||||
|
||||
imageBox.SetBounds(Dpi(368), Dpi(36), Dpi(16), Dpi(16));
|
||||
if (allowExeBrowse)
|
||||
{
|
||||
textBox.SetBounds(Dpi(12), Dpi(44), Dpi(286), Dpi(20));
|
||||
buttonBrowse.SetBounds(Dpi(305), Dpi(39), Dpi(75), Dpi(23));
|
||||
buttonBrowse.Click += buttonBrowse_Click;
|
||||
}
|
||||
|
||||
imageBox.SetBounds(Dpi(368), Dpi(44), Dpi(16), Dpi(16));
|
||||
|
||||
label.AutoSize = true;
|
||||
label.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
imageBox.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
|
||||
textBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
buttonBrowse.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
|
||||
form.ClientSize = new Size(Dpi(396), Dpi(107));
|
||||
form.ClientSize = new Size(Math.Max(Dpi(300), label.Right + Dpi(10)), form.ClientSize.Height);
|
||||
form.Controls.AddRange(new Control[] { label, textBox, imageBox, buttonOk, buttonCancel });
|
||||
form.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
form.MinimumSize = form.Size;
|
||||
form.MaximumSize = new Size(form.MinimumSize.Width * 2, form.MinimumSize.Height);
|
||||
|
||||
form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
|
||||
if (!allowExeBrowse)
|
||||
form.Controls.Add(imageBox);
|
||||
else
|
||||
form.Controls.Add(buttonBrowse);
|
||||
|
||||
form.ShowIcon = false;
|
||||
form.FormBorderStyle = FormBorderStyle.Sizable;
|
||||
form.StartPosition = FormStartPosition.CenterParent;
|
||||
form.MinimizeBox = false;
|
||||
form.MaximizeBox = false;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
@@ -21,6 +22,10 @@ namespace nspector.Common.Helper
|
||||
|
||||
public bool ShowScannedUnknownSettings { get; set; } = false;
|
||||
|
||||
public List<string> HiddenSettingGroups { get; set; } = new List<string>();
|
||||
|
||||
public bool DisableUpdateCheck { get; set; } = false;
|
||||
|
||||
private static string GetSettingsFilename()
|
||||
{
|
||||
var fiPortalbleSettings = new FileInfo("settings.xml");
|
||||
|
||||
@@ -157,6 +157,11 @@ namespace nspector.Common.Meta
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetAlternateNames(uint settingId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public byte[] GetBinaryDefaultValue(uint settingId)
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -3,6 +3,7 @@ using nspector.Native.NVAPI2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using nspector.Common.Helper;
|
||||
|
||||
namespace nspector.Common.Meta
|
||||
{
|
||||
@@ -42,13 +43,19 @@ namespace nspector.Common.Meta
|
||||
}
|
||||
}
|
||||
|
||||
private string ProcessNameReplacements(string friendlyName)
|
||||
{
|
||||
// Apply string version replacements here before settings are fully loaded, so that string-to-value mappings can be preserved
|
||||
return DlssHelper.ReplaceDlssVersions(friendlyName);
|
||||
}
|
||||
|
||||
public string GetSettingName(uint settingId)
|
||||
{
|
||||
var setting = customSettings.Settings
|
||||
.FirstOrDefault(x => x.SettingId.Equals(settingId));
|
||||
|
||||
if (setting != null)
|
||||
return setting.UserfriendlyName;
|
||||
return ProcessNameReplacements(setting.UserfriendlyName);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -86,7 +93,7 @@ namespace nspector.Common.Meta
|
||||
{
|
||||
ValuePos = i++,
|
||||
Value = x.SettingValue,
|
||||
ValueName = _source == SettingMetaSource.CustomSettings ? x.UserfriendlyName : DrsUtil.GetDwordString(x.SettingValue) + " " + x.UserfriendlyName,
|
||||
ValueName = _source == SettingMetaSource.CustomSettings ? ProcessNameReplacements(x.UserfriendlyName) : DrsUtil.GetDwordString(x.SettingValue) + " " + ProcessNameReplacements(x.UserfriendlyName),
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
@@ -111,6 +118,14 @@ namespace nspector.Common.Meta
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetAlternateNames(uint settingId)
|
||||
{
|
||||
var setting = customSettings.Settings
|
||||
.FirstOrDefault(x => x.SettingId.Equals(settingId));
|
||||
|
||||
return setting?.AlternateNames;
|
||||
}
|
||||
|
||||
public byte[] GetBinaryDefaultValue(uint settingId)
|
||||
{
|
||||
return null;
|
||||
@@ -126,6 +141,21 @@ namespace nspector.Common.Meta
|
||||
var setting = customSettings.Settings
|
||||
.FirstOrDefault(x => x.SettingId.Equals(settingId));
|
||||
|
||||
if (DrsSettingsServiceBase.DriverVersion > 0)
|
||||
{
|
||||
if (DrsSettingsServiceBase.DriverVersion > 425.31 && (settingId & 0xFF000000) == 0x70000000)
|
||||
return true; // 3D vision settings removed after 425.31
|
||||
|
||||
if (setting == null)
|
||||
return false;
|
||||
|
||||
if (setting.MinRequiredDriverVersion > 0 && setting.MinRequiredDriverVersion > DrsSettingsServiceBase.DriverVersion)
|
||||
return true;
|
||||
|
||||
if (setting.MaxRequiredDriverVersion > 0 && setting.MaxRequiredDriverVersion < DrsSettingsServiceBase.DriverVersion)
|
||||
return true;
|
||||
}
|
||||
|
||||
return setting?.Hidden ?? false;
|
||||
}
|
||||
|
||||
|
||||
@@ -201,6 +201,11 @@ namespace nspector.Common.Meta
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetAlternateNames(uint settingId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public byte[] GetBinaryDefaultValue(uint settingId)
|
||||
{
|
||||
var settingMeta = GetSettingsMeta(settingId);
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace nspector.Common.Meta
|
||||
|
||||
string GetGroupName(uint settingId);
|
||||
|
||||
string GetAlternateNames(uint settingId);
|
||||
|
||||
uint? GetDwordDefaultValue(uint settingId);
|
||||
|
||||
string GetStringDefaultValue(uint settingId);
|
||||
|
||||
@@ -43,6 +43,11 @@ namespace nspector.Common.Meta
|
||||
return null;
|
||||
}
|
||||
|
||||
public string GetAlternateNames(uint settingId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public uint? GetDwordDefaultValue(uint settingId)
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace nspector.Common.Meta
|
||||
|
||||
public string GroupName { get; set; }
|
||||
|
||||
public string AlternateNames { get; set; }
|
||||
|
||||
public string SettingName { get; set; }
|
||||
|
||||
public string DefaultStringValue { get; set; }
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
public string GroupName { get; set; }
|
||||
|
||||
public string AlternateNames { get; set; }
|
||||
|
||||
public SettingState State { get; set; }
|
||||
|
||||
public bool IsStringValue { get; set; }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,52 +3,58 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace nspector
|
||||
{
|
||||
internal delegate void DropFilesNativeHandler(string[] files);
|
||||
internal delegate void DropFilesNativeHandler(string[] files);
|
||||
|
||||
internal class ListViewEx : ListView
|
||||
internal class ListViewEx : ListView
|
||||
{
|
||||
|
||||
public event DropFilesNativeHandler OnDropFilesNative;
|
||||
|
||||
public event DropFilesNativeHandler OnDropFilesNative;
|
||||
|
||||
public event EventHandler<GroupStateChangedEventArgs> GroupStateChanged;
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wPar, IntPtr lPar);
|
||||
|
||||
private const int LVM_FIRST = 0x1000;
|
||||
private const int LVM_GETCOLUMNORDERARRAY = (LVM_FIRST + 59);
|
||||
|
||||
|
||||
private const int WM_PAINT = 0x000F;
|
||||
private const int WM_VSCROLL = 0x0115;
|
||||
private const int WM_HSCROLL = 0x0114;
|
||||
private const int WM_MOUSEWHEEL = 0x020A;
|
||||
|
||||
private struct EmbeddedControl
|
||||
{
|
||||
internal Control Control;
|
||||
internal int Column;
|
||||
internal int Row;
|
||||
internal DockStyle Dock;
|
||||
internal ListViewItem Item;
|
||||
internal Control Control;
|
||||
internal int Column;
|
||||
internal int Row;
|
||||
internal DockStyle Dock;
|
||||
internal ListViewItem Item;
|
||||
}
|
||||
|
||||
private ArrayList _embeddedControls = new ArrayList();
|
||||
|
||||
public ListViewEx()
|
||||
{
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
|
||||
}
|
||||
public ListViewEx()
|
||||
{
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||
this.SetStyle(ControlStyles.EnableNotifyMessage, true);
|
||||
}
|
||||
|
||||
protected override void OnNotifyMessage(Message m)
|
||||
{
|
||||
if (m.Msg != 0x14)
|
||||
{
|
||||
base.OnNotifyMessage(m);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnNotifyMessage(Message m)
|
||||
{
|
||||
if (m.Msg != 0x14)
|
||||
{
|
||||
base.OnNotifyMessage(m);
|
||||
}
|
||||
}
|
||||
|
||||
protected int[] GetColumnOrder()
|
||||
{
|
||||
IntPtr lPar = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)) * Columns.Count);
|
||||
@@ -82,8 +88,14 @@ namespace nspector
|
||||
if (SubItem >= order.Length)
|
||||
throw new IndexOutOfRangeException("SubItem "+SubItem+" out of range");
|
||||
|
||||
Rectangle lviBounds = Item.GetBounds(ItemBoundsPortion.Entire);
|
||||
int subItemX = lviBounds.Left;
|
||||
Rectangle lviBounds;
|
||||
try
|
||||
{
|
||||
lviBounds = Item.GetBounds(ItemBoundsPortion.Entire);
|
||||
}
|
||||
catch { return subItemRect; }
|
||||
|
||||
int subItemX = lviBounds.Left;
|
||||
|
||||
ColumnHeader col;
|
||||
int i;
|
||||
@@ -94,18 +106,18 @@ namespace nspector
|
||||
break;
|
||||
subItemX += col.Width;
|
||||
}
|
||||
|
||||
|
||||
subItemRect = new Rectangle(subItemX, lviBounds.Top-1, this.Columns[order[i]].Width, lviBounds.Height);
|
||||
|
||||
return subItemRect;
|
||||
}
|
||||
|
||||
internal void AddEmbeddedControl(Control c, int col, int row)
|
||||
internal void AddEmbeddedControl(Control c, int col, int row)
|
||||
{
|
||||
AddEmbeddedControl(c,col,row,DockStyle.Fill);
|
||||
}
|
||||
|
||||
internal void AddEmbeddedControl(Control c, int col, int row, DockStyle dock)
|
||||
internal void AddEmbeddedControl(Control c, int col, int row, DockStyle dock)
|
||||
{
|
||||
if (c==null)
|
||||
throw new ArgumentNullException();
|
||||
@@ -122,11 +134,11 @@ namespace nspector
|
||||
_embeddedControls.Add(ec);
|
||||
|
||||
c.Click += new EventHandler(_embeddedControl_Click);
|
||||
|
||||
|
||||
this.Controls.Add(c);
|
||||
}
|
||||
|
||||
internal void RemoveEmbeddedControl(Control c)
|
||||
|
||||
internal void RemoveEmbeddedControl(Control c)
|
||||
{
|
||||
if (c == null)
|
||||
throw new ArgumentNullException();
|
||||
@@ -143,8 +155,8 @@ namespace nspector
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal Control GetEmbeddedControl(int col, int row)
|
||||
|
||||
internal Control GetEmbeddedControl(int col, int row)
|
||||
{
|
||||
foreach (EmbeddedControl ec in _embeddedControls)
|
||||
if (ec.Row == row && ec.Column == col)
|
||||
@@ -154,9 +166,9 @@ namespace nspector
|
||||
}
|
||||
|
||||
[DefaultValue(View.LargeIcon)]
|
||||
internal new View View
|
||||
internal new View View
|
||||
{
|
||||
get
|
||||
get
|
||||
{
|
||||
return base.View;
|
||||
}
|
||||
@@ -169,12 +181,18 @@ namespace nspector
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("shell32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern int DragQueryFile(IntPtr hDrop, uint iFile, [Out] StringBuilder lpszFile, int cch);
|
||||
private const int WM_DROPFILES = 0x233;
|
||||
[DllImport("shell32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern int DragQueryFile(IntPtr hDrop, uint iFile, [Out] StringBuilder lpszFile, int cch);
|
||||
private const int WM_DROPFILES = 0x233;
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == WM_LBUTTONUP)
|
||||
{
|
||||
base.DefWndProc(ref m); // Fix for collapsible buttons
|
||||
return;
|
||||
}
|
||||
|
||||
switch (m.Msg)
|
||||
{
|
||||
case WM_PAINT:
|
||||
@@ -183,6 +201,10 @@ namespace nspector
|
||||
|
||||
foreach (EmbeddedControl ec in _embeddedControls)
|
||||
{
|
||||
// Skip repositioning if the control is a dropped-down ComboBox, prevents it from immediately closing on first click
|
||||
if (ec.Control is ComboBox comboBox && comboBox.DroppedDown)
|
||||
continue;
|
||||
|
||||
Rectangle rc = this.GetSubItemBounds(ec.Item, ec.Column);
|
||||
|
||||
if ((this.HeaderStyle != ColumnHeaderStyle.None) &&
|
||||
@@ -220,44 +242,97 @@ namespace nspector
|
||||
}
|
||||
|
||||
|
||||
rc.X = rc.X + ec.Control.Margin.Left;
|
||||
rc.Y = rc.Y + ec.Control.Margin.Top;
|
||||
rc.Width = rc.Width - ec.Control.Margin.Right;
|
||||
rc.Height = rc.Height - ec.Control.Margin.Bottom;
|
||||
rc.X = rc.X + ec.Control.Margin.Left;
|
||||
rc.Y = rc.Y + ec.Control.Margin.Top;
|
||||
rc.Width = rc.Width - ec.Control.Margin.Right;
|
||||
rc.Height = rc.Height - ec.Control.Margin.Bottom;
|
||||
|
||||
ec.Control.Bounds = rc;
|
||||
ec.Control.Bounds = rc;
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DROPFILES:
|
||||
|
||||
if (OnDropFilesNative != null)
|
||||
{
|
||||
var dropped = DragQueryFile(m.WParam, 0xFFFFFFFF, null, 0);
|
||||
if (dropped > 0)
|
||||
{
|
||||
var files = new List<string>();
|
||||
|
||||
for (uint i = 0; i < dropped; i++)
|
||||
{
|
||||
var size = DragQueryFile(m.WParam, i, null, 0);
|
||||
if (size > 0)
|
||||
{
|
||||
var sb = new StringBuilder(size + 1);
|
||||
var result = DragQueryFile(m.WParam, i, sb, size + 1);
|
||||
files.Add(sb.ToString());
|
||||
}
|
||||
}
|
||||
case WM_VSCROLL:
|
||||
case WM_HSCROLL:
|
||||
case WM_MOUSEWHEEL:
|
||||
// Close any opened comboboxes if listview is being scrolled
|
||||
foreach (EmbeddedControl ec in _embeddedControls)
|
||||
{
|
||||
if (ec.Control is ComboBox comboBox && comboBox.DroppedDown)
|
||||
{
|
||||
comboBox.DroppedDown = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
OnDropFilesNative(files.ToArray());
|
||||
}
|
||||
}
|
||||
case WM_DROPFILES:
|
||||
|
||||
base.WndProc(ref m);
|
||||
break;
|
||||
if (OnDropFilesNative != null)
|
||||
{
|
||||
var dropped = DragQueryFile(m.WParam, 0xFFFFFFFF, null, 0);
|
||||
if (dropped > 0)
|
||||
{
|
||||
var files = new List<string>();
|
||||
|
||||
for (uint i = 0; i < dropped; i++)
|
||||
{
|
||||
var size = DragQueryFile(m.WParam, i, null, 0);
|
||||
if (size > 0)
|
||||
{
|
||||
var sb = new StringBuilder(size + 1);
|
||||
var result = DragQueryFile(m.WParam, i, sb, size + 1);
|
||||
files.Add(sb.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
OnDropFilesNative(files.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
base.WndProc(ref m);
|
||||
break;
|
||||
|
||||
case WM_NOTIFY:
|
||||
case WM_REFLECT_NOTIFY:
|
||||
var nmhdr = (NMHDR)Marshal.PtrToStructure(m.LParam, typeof(NMHDR));
|
||||
|
||||
// Check if this is an (undocumented) listview group notification
|
||||
// https://www.zabkat.com/blog/05Feb12-collapsible-listview.htm
|
||||
if (nmhdr.code == LVN_GROUPINFO && !_isUpdatingGroups)
|
||||
{
|
||||
// Group state has changed - get the group info
|
||||
var lvGroupInfo = (NMLVGROUP)Marshal.PtrToStructure(m.LParam, typeof(NMLVGROUP));
|
||||
|
||||
// Find the corresponding ListViewGroup
|
||||
ListViewGroup changedGroup = null;
|
||||
foreach (ListViewGroup group in this.Groups)
|
||||
{
|
||||
int? groupId = GetGroupID(group);
|
||||
if (groupId.HasValue && groupId.Value == lvGroupInfo.iGroupId)
|
||||
{
|
||||
changedGroup = group;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (changedGroup != null)
|
||||
{
|
||||
// Determine if collapsed or expanded based on state
|
||||
bool isCollapsed = (lvGroupInfo.uNewState & (int)ListViewGroupState.Collapsed) != 0;
|
||||
|
||||
// Fire the event
|
||||
GroupStateChanged?.Invoke(this, new GroupStateChangedEventArgs
|
||||
{
|
||||
Group = changedGroup,
|
||||
IsCollapsed = isCollapsed,
|
||||
NewState = (ListViewGroupState)lvGroupInfo.uNewState
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
base.WndProc (ref m);
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
private void _embeddedControl_Click(object sender, EventArgs e)
|
||||
@@ -271,5 +346,401 @@ namespace nspector
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Collapsible groups - https://www.codeproject.com/Articles/451742/Extending-Csharp-ListView-with-Collapsible-Groups
|
||||
|
||||
private bool _isUpdatingGroups = false;
|
||||
|
||||
private const int WM_NOTIFY = 0x004E;
|
||||
private const int WM_REFLECT_NOTIFY = 0x204E;
|
||||
|
||||
private const int LVN_FIRST = -100;
|
||||
private const int LVN_GROUPINFO = (LVN_FIRST - 88);
|
||||
|
||||
private const int LVM_SETGROUPINFO = (LVM_FIRST + 147); // ListView messages Setinfo on Group
|
||||
private const int WM_LBUTTONUP = 0x0202; // Windows message left button
|
||||
|
||||
private delegate void CallBackSetGroupState(ListViewGroup lstvwgrp, ListViewGroupState state);
|
||||
private delegate void CallbackSetGroupString(ListViewGroup lstvwgrp, string value);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, LVGROUP lParam);
|
||||
|
||||
private static int? GetGroupID(ListViewGroup lstvwgrp)
|
||||
{
|
||||
int? rtnval = null;
|
||||
Type GrpTp = lstvwgrp.GetType();
|
||||
if (GrpTp != null)
|
||||
{
|
||||
PropertyInfo pi = GrpTp.GetProperty("ID", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
if (pi != null)
|
||||
{
|
||||
object tmprtnval = pi.GetValue(lstvwgrp, null);
|
||||
if (tmprtnval != null)
|
||||
{
|
||||
rtnval = tmprtnval as int?;
|
||||
}
|
||||
}
|
||||
}
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
private static void setGrpState(ListViewGroup lstvwgrp, ListViewGroupState state)
|
||||
{
|
||||
if (Environment.OSVersion.Version.Major < 6) //Only Vista and forward allows collaps of ListViewGroups
|
||||
return;
|
||||
if (lstvwgrp == null || lstvwgrp.ListView == null)
|
||||
return;
|
||||
if (lstvwgrp.ListView.InvokeRequired)
|
||||
lstvwgrp.ListView.Invoke(new CallBackSetGroupState(setGrpState), lstvwgrp, state);
|
||||
else
|
||||
{
|
||||
int? GrpId = GetGroupID(lstvwgrp);
|
||||
int gIndex = lstvwgrp.ListView.Groups.IndexOf(lstvwgrp);
|
||||
LVGROUP group = new LVGROUP();
|
||||
group.CbSize = Marshal.SizeOf(group);
|
||||
group.State = state;
|
||||
group.Mask = ListViewGroupMask.State;
|
||||
if (GrpId != null)
|
||||
{
|
||||
group.IGroupId = GrpId.Value;
|
||||
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, group);
|
||||
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, group);
|
||||
}
|
||||
else
|
||||
{
|
||||
group.IGroupId = gIndex;
|
||||
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, group);
|
||||
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, group);
|
||||
}
|
||||
lstvwgrp.ListView.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private static void setGrpFooter(ListViewGroup lstvwgrp, string footer)
|
||||
{
|
||||
if (Environment.OSVersion.Version.Major < 6) //Only Vista and forward allows footer on ListViewGroups
|
||||
return;
|
||||
if (lstvwgrp == null || lstvwgrp.ListView == null)
|
||||
return;
|
||||
if (lstvwgrp.ListView.InvokeRequired)
|
||||
lstvwgrp.ListView.Invoke(new CallbackSetGroupString(setGrpFooter), lstvwgrp, footer);
|
||||
else
|
||||
{
|
||||
int? GrpId = GetGroupID(lstvwgrp);
|
||||
int gIndex = lstvwgrp.ListView.Groups.IndexOf(lstvwgrp);
|
||||
LVGROUP group = new LVGROUP();
|
||||
group.CbSize = Marshal.SizeOf(group);
|
||||
group.PszFooter = footer;
|
||||
group.Mask = ListViewGroupMask.Footer;
|
||||
if (GrpId != null)
|
||||
{
|
||||
group.IGroupId = GrpId.Value;
|
||||
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, group);
|
||||
}
|
||||
else
|
||||
{
|
||||
group.IGroupId = gIndex;
|
||||
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, gIndex, group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetGroupState(ListViewGroupState state)
|
||||
{
|
||||
_isUpdatingGroups = true;
|
||||
foreach (ListViewGroup lvg in this.Groups)
|
||||
setGrpState(lvg, state);
|
||||
_isUpdatingGroups = false;
|
||||
}
|
||||
|
||||
public void SetGroupState(ListViewGroup group, ListViewGroupState state)
|
||||
{
|
||||
_isUpdatingGroups = true;
|
||||
setGrpState(group, state);
|
||||
_isUpdatingGroups = false;
|
||||
}
|
||||
|
||||
public void SetGroupFooter(ListViewGroup lvg, string footerText)
|
||||
{
|
||||
setGrpFooter(lvg, footerText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// LVGROUP StructureUsed to set and retrieve groups.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// LVGROUP myLVGROUP = new LVGROUP();
|
||||
/// myLVGROUP.CbSize // is of managed type uint
|
||||
/// myLVGROUP.Mask // is of managed type uint
|
||||
/// myLVGROUP.PszHeader // is of managed type string
|
||||
/// myLVGROUP.CchHeader // is of managed type int
|
||||
/// myLVGROUP.PszFooter // is of managed type string
|
||||
/// myLVGROUP.CchFooter // is of managed type int
|
||||
/// myLVGROUP.IGroupId // is of managed type int
|
||||
/// myLVGROUP.StateMask // is of managed type uint
|
||||
/// myLVGROUP.State // is of managed type uint
|
||||
/// myLVGROUP.UAlign // is of managed type uint
|
||||
/// myLVGROUP.PszSubtitle // is of managed type IntPtr
|
||||
/// myLVGROUP.CchSubtitle // is of managed type uint
|
||||
/// myLVGROUP.PszTask // is of managed type string
|
||||
/// myLVGROUP.CchTask // is of managed type uint
|
||||
/// myLVGROUP.PszDescriptionTop // is of managed type string
|
||||
/// myLVGROUP.CchDescriptionTop // is of managed type uint
|
||||
/// myLVGROUP.PszDescriptionBottom // is of managed type string
|
||||
/// myLVGROUP.CchDescriptionBottom // is of managed type uint
|
||||
/// myLVGROUP.ITitleImage // is of managed type int
|
||||
/// myLVGROUP.IExtendedImage // is of managed type int
|
||||
/// myLVGROUP.IFirstItem // is of managed type int
|
||||
/// myLVGROUP.CItems // is of managed type IntPtr
|
||||
/// myLVGROUP.PszSubsetTitle // is of managed type IntPtr
|
||||
/// myLVGROUP.CchSubsetTitle // is of managed type IntPtr
|
||||
/// </example>
|
||||
/// <remarks>
|
||||
/// The LVGROUP structure was created by Paw Jershauge
|
||||
/// Created: Jan. 2008.
|
||||
/// The LVGROUP structure code is based on information from Microsoft's MSDN2 website.
|
||||
/// The structure is generated via an automated converter and is as is.
|
||||
/// The structure may or may not hold errors inside the code, so use at own risk.
|
||||
/// Reference url: http://msdn.microsoft.com/en-us/library/bb774769(VS.85).aspx
|
||||
/// </remarks>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode), Description("LVGROUP StructureUsed to set and retrieve groups.")]
|
||||
public struct LVGROUP
|
||||
{
|
||||
/// <summary>
|
||||
/// Size of this structure, in bytes.
|
||||
/// </summary>
|
||||
[Description("Size of this structure, in bytes.")]
|
||||
public int CbSize;
|
||||
|
||||
/// <summary>
|
||||
/// Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONENo other items are valid.
|
||||
/// </summary>
|
||||
[Description("Mask that specifies which members of the structure are valid input. One or more of the following values:LVGF_NONE No other items are valid.")]
|
||||
public ListViewGroupMask Mask;
|
||||
|
||||
/// <summary>
|
||||
/// Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.
|
||||
/// </summary>
|
||||
[Description("Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.")]
|
||||
[MarshalAs(UnmanagedType.LPWStr)]
|
||||
public string PszHeader;
|
||||
|
||||
/// <summary>
|
||||
/// Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public int CchHeader;
|
||||
|
||||
/// <summary>
|
||||
/// Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.
|
||||
/// </summary>
|
||||
[Description("Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.")]
|
||||
[MarshalAs(UnmanagedType.LPWStr)]
|
||||
public string PszFooter;
|
||||
|
||||
/// <summary>
|
||||
/// Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public int CchFooter;
|
||||
|
||||
/// <summary>
|
||||
/// ID of the group.
|
||||
/// </summary>
|
||||
[Description("ID of the group.")]
|
||||
public int IGroupId;
|
||||
|
||||
/// <summary>
|
||||
/// Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.
|
||||
/// </summary>
|
||||
[Description("Mask used with LVM_GETGROUPINFO (Microsoft Windows XP and Windows Vista) and LVM_SETGROUPINFO (Windows Vista only) to specify which flags in the state value are being retrieved or set.")]
|
||||
public int StateMask;
|
||||
|
||||
/// <summary>
|
||||
/// Flag that can have one of the following values:LVGS_NORMALGroups are expanded, the group name is displayed, and all items in the group are displayed.
|
||||
/// </summary>
|
||||
[Description("Flag that can have one of the following values:LVGS_NORMAL Groups are expanded, the group name is displayed, and all items in the group are displayed.")]
|
||||
public ListViewGroupState State;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.
|
||||
/// </summary>
|
||||
[Description("Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional. Windows XP: Footer flags are reserved.LVGA_FOOTER_CENTERReserved.")]
|
||||
public uint UAlign;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.")]
|
||||
public IntPtr PszSubtitle;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public uint CchSubtitle;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.")]
|
||||
[MarshalAs(UnmanagedType.LPWStr)]
|
||||
public string PszTask;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public uint CchTask;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
|
||||
[MarshalAs(UnmanagedType.LPWStr)]
|
||||
public string PszDescriptionTop;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public uint CchDescriptionTop;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.")]
|
||||
[MarshalAs(UnmanagedType.LPWStr)]
|
||||
public string PszDescriptionBottom;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public uint CchDescriptionBottom;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Index of the title image in the control imagelist.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Index of the title image in the control imagelist.")]
|
||||
public int ITitleImage;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Index of the extended image in the control imagelist.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Index of the extended image in the control imagelist.")]
|
||||
public int IExtendedImage;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Read-only.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Read-only.")]
|
||||
public int IFirstItem;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Read-only in non-owner data mode.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Read-only in non-owner data mode.")]
|
||||
public IntPtr CItems;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.")]
|
||||
public IntPtr PszSubsetTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.
|
||||
/// </summary>
|
||||
[Description("Windows Vista. Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.")]
|
||||
public IntPtr CchSubsetTitle;
|
||||
}
|
||||
|
||||
public class GroupStateChangedEventArgs : EventArgs
|
||||
{
|
||||
public ListViewGroup Group { get; set; }
|
||||
public bool IsCollapsed { get; set; }
|
||||
public ListViewGroupState NewState { get; set; }
|
||||
}
|
||||
|
||||
public enum ListViewGroupMask
|
||||
{
|
||||
None = 0x00000,
|
||||
Header = 0x00001,
|
||||
Footer = 0x00002,
|
||||
State = 0x00004,
|
||||
Align = 0x00008,
|
||||
GroupId = 0x00010,
|
||||
SubTitle = 0x00100,
|
||||
Task = 0x00200,
|
||||
DescriptionTop = 0x00400,
|
||||
DescriptionBottom = 0x00800,
|
||||
TitleImage = 0x01000,
|
||||
ExtendedImage = 0x02000,
|
||||
Items = 0x04000,
|
||||
Subset = 0x08000,
|
||||
SubsetItems = 0x10000
|
||||
}
|
||||
|
||||
public enum ListViewGroupState
|
||||
{
|
||||
/// <summary>
|
||||
/// Groups are expanded, the group name is displayed, and all items in the group are displayed.
|
||||
/// </summary>
|
||||
Normal = 0,
|
||||
/// <summary>
|
||||
/// The group is collapsed.
|
||||
/// </summary>
|
||||
Collapsed = 1,
|
||||
/// <summary>
|
||||
/// The group is hidden.
|
||||
/// </summary>
|
||||
Hidden = 2,
|
||||
/// <summary>
|
||||
/// Version 6.00 and Windows Vista. The group does not display a header.
|
||||
/// </summary>
|
||||
NoHeader = 4,
|
||||
/// <summary>
|
||||
/// Version 6.00 and Windows Vista. The group can be collapsed.
|
||||
/// </summary>
|
||||
Collapsible = 8,
|
||||
/// <summary>
|
||||
/// Version 6.00 and Windows Vista. The group has keyboard focus.
|
||||
/// </summary>
|
||||
Focused = 16,
|
||||
/// <summary>
|
||||
/// Version 6.00 and Windows Vista. The group is selected.
|
||||
/// </summary>
|
||||
Selected = 32,
|
||||
/// <summary>
|
||||
/// Version 6.00 and Windows Vista. The group displays only a portion of its items.
|
||||
/// </summary>
|
||||
SubSeted = 64,
|
||||
/// <summary>
|
||||
/// Version 6.00 and Windows Vista. The subset link of the group has keyboard focus.
|
||||
/// </summary>
|
||||
SubSetLinkFocused = 128,
|
||||
}
|
||||
|
||||
// Required structures for the notification
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NMHDR
|
||||
{
|
||||
public IntPtr hwndFrom;
|
||||
public UIntPtr idFrom;
|
||||
public int code;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NMLVGROUP
|
||||
{
|
||||
public NMHDR hdr;
|
||||
public int iGroupId;
|
||||
public uint uNewState;
|
||||
public uint uOldState;
|
||||
public int state; // Current state
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
{
|
||||
public enum ESetting : uint {
|
||||
OGL_AA_LINE_GAMMA_ID = 0x2089BF6C,
|
||||
OGL_CPL_GDI_COMPATIBILITY_ID = 0x2072C5A3,
|
||||
OGL_CPL_PREFER_DXPRESENT_ID = 0x20D690F8,
|
||||
OGL_DEEP_COLOR_SCANOUT_ID = 0x2097C2F6,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_ID = 0x206A6582,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ID = 0x206C4581,
|
||||
@@ -16,7 +18,6 @@
|
||||
OGL_OVERLAY_SUPPORT_ID = 0x206C28C4,
|
||||
OGL_QUALITY_ENHANCEMENTS_ID = 0x20797D6C,
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_ID = 0x20A29055,
|
||||
OGL_SLI_CFR_MODE_ID = 0x20343843,
|
||||
OGL_SLI_MULTICAST_ID = 0x2092D3BE,
|
||||
OGL_THREAD_CONTROL_ID = 0x20C1221E,
|
||||
OGL_TMON_LEVEL_ID = 0x202888C1,
|
||||
@@ -33,6 +34,8 @@
|
||||
ANSEL_ALLOW_ID = 0x1035DB89,
|
||||
ANSEL_ALLOWLISTED_ID = 0x1085DA8A,
|
||||
ANSEL_ENABLE_ID = 0x1075D972,
|
||||
APPIDLE_DYNAMIC_FRL_FPS_ID = 0x10835016,
|
||||
APPIDLE_DYNAMIC_FRL_THRESHOLD_TIME_ID = 0x10835017,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ID = 0x104554B6,
|
||||
APPLICATION_STEAM_ID_ID = 0x107CDDBC,
|
||||
BATTERY_BOOST_APP_FPS_ID = 0x10115C8C,
|
||||
@@ -47,6 +50,22 @@
|
||||
FXAA_INDICATOR_ENABLE_ID = 0x1068FB9C,
|
||||
LATENCY_INDICATOR_AUTOALIGN_ID = 0x1095F170,
|
||||
MCSFRSHOWSPLIT_ID = 0x10287051,
|
||||
NGX_DLAA_OVERRIDE_ID = 0x10E41DF4,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_ID = 0x104D6667,
|
||||
NGX_DLSS_FG_OVERRIDE_ID = 0x10E41E03,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_ID = 0x10C7D57E,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_ID = 0x10C7D519,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_ID = 0x10AFB76C,
|
||||
NGX_DLSS_RR_MODE_ID = 0x10BD9423,
|
||||
NGX_DLSS_RR_OVERRIDE_ID = 0x10E41E02,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_ID = 0x10E41DF7,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_ID = 0x10C7D86C,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_ID = 0x10C7D597,
|
||||
NGX_DLSS_SR_MODE_ID = 0x10AFB768,
|
||||
NGX_DLSS_SR_OVERRIDE_ID = 0x10E41E01,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_ID = 0x10E41DF3,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_ID = 0x10C7D684,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_ID = 0x10C7D82C,
|
||||
NV_QUALITY_UPSCALING_ID = 0x10444444,
|
||||
OPTIMUS_MAXAA_ID = 0x10F9DC83,
|
||||
PHYSXINDICATOR_ID = 0x1094F16F,
|
||||
@@ -74,7 +93,6 @@
|
||||
VSYNC_BEHAVIOR_FLAGS_ID = 0x10FDEC23,
|
||||
WKS_API_STEREO_EYES_EXCHANGE_ID = 0x11AE435C,
|
||||
WKS_API_STEREO_MODE_ID = 0x11E91A61,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_ID = 0x11112233,
|
||||
WKS_STEREO_DONGLE_SUPPORT_ID = 0x112493BD,
|
||||
WKS_STEREO_SUPPORT_ID = 0x11AA9E99,
|
||||
WKS_STEREO_SWAP_MODE_ID = 0x11333333,
|
||||
@@ -87,6 +105,7 @@
|
||||
MAXWELL_B_SAMPLE_INTERLEAVE_ID = 0x0098C1AC,
|
||||
PRERENDERLIMIT_ID = 0x007BA09E,
|
||||
PS_SHADERDISKCACHE_ID = 0x00198FFF,
|
||||
PS_SHADERDISKCACHE_DLL_PATH_WCHAR_ID = 0x0019A002,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_ID = 0x00AC8497,
|
||||
PS_TEXFILTER_ANISO_OPTS2_ID = 0x00E73211,
|
||||
PS_TEXFILTER_BILINEAR_IN_ANISO_ID = 0x0084CD70,
|
||||
@@ -99,9 +118,9 @@
|
||||
SET_VAB_DATA_ID = 0x00AB8687,
|
||||
VSYNCMODE_ID = 0x00A879CF,
|
||||
VSYNCTEARCONTROL_ID = 0x005A375C,
|
||||
TOTAL_DWORD_SETTING_NUM = 94,
|
||||
TOTAL_WSTRING_SETTING_NUM = 4,
|
||||
TOTAL_SETTING_NUM = 98,
|
||||
TOTAL_DWORD_SETTING_NUM = 112,
|
||||
TOTAL_WSTRING_SETTING_NUM = 5,
|
||||
TOTAL_SETTING_NUM = 117,
|
||||
INVALID_SETTING_ID = 0xFFFFFFFF
|
||||
}
|
||||
|
||||
@@ -114,6 +133,22 @@
|
||||
OGL_AA_LINE_GAMMA_DEFAULT = OGL_AA_LINE_GAMMA_DISABLED
|
||||
}
|
||||
|
||||
public enum EValues_OGL_CPL_GDI_COMPATIBILITY : uint {
|
||||
OGL_CPL_GDI_COMPATIBILITY_PREFER_DISABLED = 0x00000000,
|
||||
OGL_CPL_GDI_COMPATIBILITY_PREFER_ENABLED = 0x00000001,
|
||||
OGL_CPL_GDI_COMPATIBILITY_AUTO = 0x00000002,
|
||||
OGL_CPL_GDI_COMPATIBILITY_NUM_VALUES = 3,
|
||||
OGL_CPL_GDI_COMPATIBILITY_DEFAULT = OGL_CPL_GDI_COMPATIBILITY_AUTO
|
||||
}
|
||||
|
||||
public enum EValues_OGL_CPL_PREFER_DXPRESENT : uint {
|
||||
OGL_CPL_PREFER_DXPRESENT_PREFER_DISABLED = 0x00000000,
|
||||
OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED = 0x00000001,
|
||||
OGL_CPL_PREFER_DXPRESENT_AUTO = 0x00000002,
|
||||
OGL_CPL_PREFER_DXPRESENT_NUM_VALUES = 3,
|
||||
OGL_CPL_PREFER_DXPRESENT_DEFAULT = OGL_CPL_PREFER_DXPRESENT_AUTO
|
||||
}
|
||||
|
||||
public enum EValues_OGL_DEEP_COLOR_SCANOUT : uint {
|
||||
OGL_DEEP_COLOR_SCANOUT_DISABLE = 0,
|
||||
OGL_DEEP_COLOR_SCANOUT_ENABLE = 1,
|
||||
@@ -207,14 +242,6 @@
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_DEFAULT = OGL_SINGLE_BACKDEPTH_BUFFER_DISABLE
|
||||
}
|
||||
|
||||
public enum EValues_OGL_SLI_CFR_MODE : uint {
|
||||
OGL_SLI_CFR_MODE_DISABLE = 0x00,
|
||||
OGL_SLI_CFR_MODE_ENABLE = 0x01,
|
||||
OGL_SLI_CFR_MODE_CLASSIC_SFR = 0x02,
|
||||
OGL_SLI_CFR_MODE_NUM_VALUES = 3,
|
||||
OGL_SLI_CFR_MODE_DEFAULT = OGL_SLI_CFR_MODE_DISABLE
|
||||
}
|
||||
|
||||
public enum EValues_OGL_SLI_MULTICAST : uint {
|
||||
OGL_SLI_MULTICAST_DISABLE = 0x00,
|
||||
OGL_SLI_MULTICAST_ENABLE = 0x01,
|
||||
@@ -512,6 +539,146 @@
|
||||
MCSFRSHOWSPLIT_DEFAULT = MCSFRSHOWSPLIT_DISABLED
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLAA_OVERRIDE : uint {
|
||||
NGX_DLAA_OVERRIDE_DLAA_DEFAULT = 0,
|
||||
NGX_DLAA_OVERRIDE_DLAA_ON = 1,
|
||||
NGX_DLAA_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLAA_OVERRIDE_DEFAULT = NGX_DLAA_OVERRIDE_DLAA_DEFAULT
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSSG_MULTI_FRAME_COUNT : uint {
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_MIN = 1,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_MAX = 15,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_DEFAULT = 1,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_NUM_VALUES = 3,
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_FG_OVERRIDE : uint {
|
||||
NGX_DLSS_FG_OVERRIDE_OFF = 0,
|
||||
NGX_DLSS_FG_OVERRIDE_ON = 1,
|
||||
NGX_DLSS_FG_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLSS_FG_OVERRIDE_DEFAULT = NGX_DLSS_FG_OVERRIDE_OFF
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1 : uint {
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_DEFAULT = 0,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_NUM_VALUES = 1,
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2 : uint {
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_DEFAULT = 0,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_NUM_VALUES = 1,
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS : uint {
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NONE = 0x0000,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_PERF_TO_9X = 0x0001,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NUM_VALUES = 2,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_DEFAULT = NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NONE
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_RR_MODE : uint {
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_PERFORMANCE = 0,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_BALANCED = 1,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_QUALITY = 2,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_SNIPPET_CONTROLLED = 3,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_DLAA = 4,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_ULTRA_PERFORMANCE = 5,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_CUSTOM = 6,
|
||||
NGX_DLSS_RR_MODE_NUM_VALUES = 7,
|
||||
NGX_DLSS_RR_MODE_DEFAULT = NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_SNIPPET_CONTROLLED
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_RR_OVERRIDE : uint {
|
||||
NGX_DLSS_RR_OVERRIDE_OFF = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_ON = 1,
|
||||
NGX_DLSS_RR_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLSS_RR_OVERRIDE_DEFAULT = NGX_DLSS_RR_OVERRIDE_OFF
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION : uint {
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_OFF = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_A = 1,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_B = 2,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_C = 3,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_D = 4,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_E = 5,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_F = 6,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_G = 7,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_H = 8,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_I = 9,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_J = 10,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_K = 11,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_L = 12,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_M = 13,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_N = 14,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_O = 15,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_Latest = 0x00ffffff,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_NUM_VALUES = 17,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_DEFAULT = NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_OFF
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1 : uint {
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_DEFAULT = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_NUM_VALUES = 1,
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2 : uint {
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_DEFAULT = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_NUM_VALUES = 1,
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_SR_MODE : uint {
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_PERFORMANCE = 0,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_BALANCED = 1,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_QUALITY = 2,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_SNIPPET_CONTROLLED = 3,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_DLAA = 4,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_ULTRA_PERFORMANCE = 5,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_CUSTOM = 6,
|
||||
NGX_DLSS_SR_MODE_NUM_VALUES = 7,
|
||||
NGX_DLSS_SR_MODE_DEFAULT = NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_SNIPPET_CONTROLLED
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_SR_OVERRIDE : uint {
|
||||
NGX_DLSS_SR_OVERRIDE_OFF = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_ON = 1,
|
||||
NGX_DLSS_SR_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLSS_SR_OVERRIDE_DEFAULT = NGX_DLSS_SR_OVERRIDE_OFF
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION : uint {
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_OFF = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_A = 1,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_B = 2,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_C = 3,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_D = 4,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_E = 5,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_F = 6,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_G = 7,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_H = 8,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_I = 9,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_J = 10,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_K = 11,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_L = 12,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_M = 13,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_N = 14,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_O = 15,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_Latest = 0x00ffffff,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_NUM_VALUES = 17,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_DEFAULT = NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_OFF
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1 : uint {
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_DEFAULT = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_NUM_VALUES = 1,
|
||||
}
|
||||
|
||||
public enum EValues_NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2 : uint {
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_DEFAULT = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_NUM_VALUES = 1,
|
||||
}
|
||||
|
||||
public enum EValues_NV_QUALITY_UPSCALING : uint {
|
||||
NV_QUALITY_UPSCALING_OFF = 0,
|
||||
NV_QUALITY_UPSCALING_ON = 1,
|
||||
@@ -554,62 +721,64 @@
|
||||
}
|
||||
|
||||
public enum EValues_SHIM_MCCOMPAT : uint {
|
||||
SHIM_MCCOMPAT_INTEGRATED = 0x00000000,
|
||||
SHIM_MCCOMPAT_ENABLE = 0x00000001,
|
||||
SHIM_MCCOMPAT_USER_EDITABLE = 0x00000002,
|
||||
SHIM_MCCOMPAT_MASK = 0x00000003,
|
||||
SHIM_MCCOMPAT_VIDEO_MASK = 0x00000004,
|
||||
SHIM_MCCOMPAT_VARYING_BIT = 0x00000008,
|
||||
SHIM_MCCOMPAT_AUTO_SELECT = 0x00000010,
|
||||
SHIM_MCCOMPAT_OVERRIDE_BIT = 0x80000000,
|
||||
SHIM_MCCOMPAT_INTEGRATED = 0x00000000U,
|
||||
SHIM_MCCOMPAT_ENABLE = 0x00000001U,
|
||||
SHIM_MCCOMPAT_USER_EDITABLE = 0x00000002U,
|
||||
SHIM_MCCOMPAT_MASK = 0x00000003U,
|
||||
SHIM_MCCOMPAT_VIDEO_MASK = 0x00000004U,
|
||||
SHIM_MCCOMPAT_VARYING_BIT = 0x00000008U,
|
||||
SHIM_MCCOMPAT_AUTO_SELECT = 0x00000010U,
|
||||
SHIM_MCCOMPAT_OVERRIDE_BIT = 0x80000000U,
|
||||
SHIM_MCCOMPAT_NUM_VALUES = 8,
|
||||
SHIM_MCCOMPAT_DEFAULT = SHIM_MCCOMPAT_AUTO_SELECT
|
||||
}
|
||||
|
||||
public enum EValues_SHIM_RENDERING_MODE : uint {
|
||||
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000,
|
||||
SHIM_RENDERING_MODE_ENABLE = 0x00000001,
|
||||
SHIM_RENDERING_MODE_USER_EDITABLE = 0x00000002,
|
||||
SHIM_RENDERING_MODE_MASK = 0x00000003,
|
||||
SHIM_RENDERING_MODE_VIDEO_MASK = 0x00000004,
|
||||
SHIM_RENDERING_MODE_VARYING_BIT = 0x00000008,
|
||||
SHIM_RENDERING_MODE_AUTO_SELECT = 0x00000010,
|
||||
SHIM_RENDERING_MODE_OVERRIDE_BIT = 0x80000000,
|
||||
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000U,
|
||||
SHIM_RENDERING_MODE_ENABLE = 0x00000001U,
|
||||
SHIM_RENDERING_MODE_USER_EDITABLE = 0x00000002U,
|
||||
SHIM_RENDERING_MODE_MASK = 0x00000003U,
|
||||
SHIM_RENDERING_MODE_VIDEO_MASK = 0x00000004U,
|
||||
SHIM_RENDERING_MODE_VARYING_BIT = 0x00000008U,
|
||||
SHIM_RENDERING_MODE_AUTO_SELECT = 0x00000010U,
|
||||
SHIM_RENDERING_MODE_OVERRIDE_BIT = 0x80000000U,
|
||||
SHIM_RENDERING_MODE_NUM_VALUES = 8,
|
||||
SHIM_RENDERING_MODE_DEFAULT = SHIM_RENDERING_MODE_AUTO_SELECT
|
||||
}
|
||||
|
||||
public enum EValues_SHIM_RENDERING_OPTIONS : uint {
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE = 0x00000000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_ASYNC_PRESENT = 0x00000001,
|
||||
SHIM_RENDERING_OPTIONS_EHSHELL_DETECT = 0x00000002,
|
||||
SHIM_RENDERING_OPTIONS_FLASHPLAYER_HOST_DETECT = 0x00000004,
|
||||
SHIM_RENDERING_OPTIONS_VIDEO_DRM_APP_DETECT = 0x00000008,
|
||||
SHIM_RENDERING_OPTIONS_IGNORE_OVERRIDES = 0x00000010,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED1 = 0x00000020,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_DWM_ASYNC_PRESENT = 0x00000040,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED2 = 0x00000080,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_INHERITANCE = 0x00000100,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_WRAPPERS = 0x00000200,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DXGI_WRAPPERS = 0x00000400,
|
||||
SHIM_RENDERING_OPTIONS_PRUNE_UNSUPPORTED_FORMATS = 0x00000800,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_ALPHA_FORMAT = 0x00001000,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING = 0x00002000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_CUDA = 0x00004000,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_CP_CAPS_FOR_VIDEO = 0x00008000,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING_FWD_OPTIMUS = 0x00010000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DURING_SECURE_BOOT = 0x00020000,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_QUADRO = 0x00040000,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_MSHYBRID = 0x00080000,
|
||||
SHIM_RENDERING_OPTIONS_REGISTER_PROCESS_ENABLE_GOLD = 0x00100000,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WINDOWED_MODE_PERF_OPT = 0x00200000,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WIN7_ASYNC_RUNTIME_BUG = 0x00400000,
|
||||
SHIM_RENDERING_OPTIONS_EXPLICIT_ADAPTER_OPTED_BY_APP = 0x00800000,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x01000000,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x02000000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_TURING_POWER_POLICY = 0x04000000,
|
||||
SHIM_RENDERING_OPTIONS_NUM_VALUES = 28,
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT = 0x00000000
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE = 0x00000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_ASYNC_PRESENT = 0x00000001U,
|
||||
SHIM_RENDERING_OPTIONS_EHSHELL_DETECT = 0x00000002U,
|
||||
SHIM_RENDERING_OPTIONS_FLASHPLAYER_HOST_DETECT = 0x00000004U,
|
||||
SHIM_RENDERING_OPTIONS_VIDEO_DRM_APP_DETECT = 0x00000008U,
|
||||
SHIM_RENDERING_OPTIONS_IGNORE_OVERRIDES = 0x00000010U,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED1 = 0x00000020U,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_DWM_ASYNC_PRESENT = 0x00000040U,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED2 = 0x00000080U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_INHERITANCE = 0x00000100U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_WRAPPERS = 0x00000200U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DXGI_WRAPPERS = 0x00000400U,
|
||||
SHIM_RENDERING_OPTIONS_PRUNE_UNSUPPORTED_FORMATS = 0x00000800U,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_ALPHA_FORMAT = 0x00001000U,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING = 0x00002000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_CUDA = 0x00004000U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_CP_CAPS_FOR_VIDEO = 0x00008000U,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING_FWD_OPTIMUS = 0x00010000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DURING_SECURE_BOOT = 0x00020000U,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_QUADRO = 0x00040000U,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_MSHYBRID = 0x00080000U,
|
||||
SHIM_RENDERING_OPTIONS_REGISTER_PROCESS_ENABLE_GOLD = 0x00100000U,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WINDOWED_MODE_PERF_OPT = 0x00200000U,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WIN7_ASYNC_RUNTIME_BUG = 0x00400000U,
|
||||
SHIM_RENDERING_OPTIONS_EXPLICIT_ADAPTER_OPTED_BY_APP = 0x00800000U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x01000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x02000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_TURING_POWER_POLICY = 0x04000000U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH_MDM = 0x08000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH_MDM = 0x10000000U,
|
||||
SHIM_RENDERING_OPTIONS_NUM_VALUES = 30,
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT = 0x00000000U
|
||||
}
|
||||
|
||||
public enum EValues_SLI_GPU_COUNT : uint {
|
||||
@@ -792,14 +961,6 @@
|
||||
WKS_API_STEREO_MODE_DEFAULT = WKS_API_STEREO_MODE_SHUTTER_GLASSES
|
||||
}
|
||||
|
||||
public enum EValues_WKS_MEMORY_ALLOCATION_POLICY : uint {
|
||||
WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED = 0x0,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_MODERATE_PRE_ALLOCATION = 0x1,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_AGGRESSIVE_PRE_ALLOCATION = 0x2,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_NUM_VALUES = 3,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_DEFAULT = WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED
|
||||
}
|
||||
|
||||
public enum EValues_WKS_STEREO_DONGLE_SUPPORT : uint {
|
||||
WKS_STEREO_DONGLE_SUPPORT_OFF = 0,
|
||||
WKS_STEREO_DONGLE_SUPPORT_DAC = 1,
|
||||
@@ -888,7 +1049,7 @@
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_MIN = 0x0,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_MAX = 0xffffffff,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_NUM_VALUES = 2,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_DEFAULT = 0x1000
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_DEFAULT = 0x2000
|
||||
}
|
||||
|
||||
public enum EValues_PS_TEXFILTER_ANISO_OPTS2 : uint {
|
||||
|
||||
@@ -1,46 +1,36 @@
|
||||
/***************************************************************************\
|
||||
|* *|
|
||||
|* Copyright NVIDIA Corporation. All rights reserved. *|
|
||||
|* *|
|
||||
|* NOTICE TO USER: *|
|
||||
|* *|
|
||||
|* This source code is subject to NVIDIA ownership rights under U.S. *|
|
||||
|* and international Copyright laws. Users and possessors of this *|
|
||||
|* source code are hereby granted a nonexclusive, royalty-free *|
|
||||
|* license to use this code in individual and commercial software. *|
|
||||
|* *|
|
||||
|* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE *|
|
||||
|* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR *|
|
||||
|* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH *|
|
||||
|* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF *|
|
||||
|* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR *|
|
||||
|* PURPOSE. IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, *|
|
||||
|* INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES *|
|
||||
|* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN *|
|
||||
|* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING *|
|
||||
|* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE *|
|
||||
|* CODE. *|
|
||||
|* *|
|
||||
|* U.S. Government End Users. This source code is a "commercial item" *|
|
||||
|* as that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting *|
|
||||
|* of "commercial computer software" and "commercial computer software *|
|
||||
|* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) *|
|
||||
|* and is provided to the U.S. Government only as a commercial end item. *|
|
||||
|* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through *|
|
||||
|* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the *|
|
||||
|* source code with only those rights set forth herein. *|
|
||||
|* *|
|
||||
|* Any use of this source code in individual and commercial software must *|
|
||||
|* include, in the user documentation and internal comments to the code, *|
|
||||
|* the above Disclaimer and U.S. Government End Users Notice. *|
|
||||
|* *|
|
||||
|* *|
|
||||
\***************************************************************************/
|
||||
|
||||
/*********************************************************************************************************\
|
||||
|* *|
|
||||
|* SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. *|
|
||||
|* SPDX-License-Identifier: MIT *|
|
||||
|* *|
|
||||
|* Permission is hereby granted, free of charge, to any person obtaining a *|
|
||||
|* copy of this software and associated documentation files (the "Software"), *|
|
||||
|* to deal in the Software without restriction, including without limitation *|
|
||||
|* the rights to use, copy, modify, merge, publish, distribute, sublicense, *|
|
||||
|* and/or sell copies of the Software, and to permit persons to whom the *|
|
||||
|* Software is furnished to do so, subject to the following conditions: *|
|
||||
|* *|
|
||||
|* The above copyright notice and this permission notice shall be included in *|
|
||||
|* all copies or substantial portions of the Software. *|
|
||||
|* *|
|
||||
|* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *|
|
||||
|* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *|
|
||||
|* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *|
|
||||
|* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *|
|
||||
|* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *|
|
||||
|* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *|
|
||||
|* DEALINGS IN THE SOFTWARE. *|
|
||||
|* *|
|
||||
|* *|
|
||||
\*********************************************************************************************************/
|
||||
|
||||
#ifndef _NVAPI_DRIVER_SETTINGS_H_
|
||||
#define _NVAPI_DRIVER_SETTINGS_H_
|
||||
|
||||
#define OGL_AA_LINE_GAMMA_STRING L"Antialiasing - Line gamma"
|
||||
#define OGL_CPL_GDI_COMPATIBILITY_STRING L"OpenGL GDI compatibility"
|
||||
#define OGL_CPL_PREFER_DXPRESENT_STRING L"Vulkan/OpenGL present method"
|
||||
#define OGL_DEEP_COLOR_SCANOUT_STRING L"Deep color for 3D applications"
|
||||
#define OGL_DEFAULT_SWAP_INTERVAL_STRING L"OpenGL default swap interval"
|
||||
#define OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_STRING L"OpenGL default swap interval fraction"
|
||||
@@ -55,7 +45,6 @@
|
||||
#define OGL_OVERLAY_SUPPORT_STRING L"Enable overlay"
|
||||
#define OGL_QUALITY_ENHANCEMENTS_STRING L"High level control of the rendering quality on OpenGL"
|
||||
#define OGL_SINGLE_BACKDEPTH_BUFFER_STRING L"Unified back/depth buffer"
|
||||
#define OGL_SLI_CFR_MODE_STRING L"Set CFR mode"
|
||||
#define OGL_SLI_MULTICAST_STRING L"Enable NV_gpu_multicast extension"
|
||||
#define OGL_THREAD_CONTROL_STRING L"Threaded optimization"
|
||||
#define OGL_TMON_LEVEL_STRING L"Event Log Tmon Severity Threshold"
|
||||
@@ -72,6 +61,8 @@
|
||||
#define ANSEL_ALLOW_STRING L"NVIDIA Predefined Ansel Usage"
|
||||
#define ANSEL_ALLOWLISTED_STRING L"Ansel flags for enabled applications"
|
||||
#define ANSEL_ENABLE_STRING L"Enable Ansel"
|
||||
#define APPIDLE_DYNAMIC_FRL_FPS_STRING L"Idle Application Max FPS Limit"
|
||||
#define APPIDLE_DYNAMIC_FRL_THRESHOLD_TIME_STRING L"Idle Application Threshold Time out in seconds"
|
||||
#define APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_STRING L"Application Profile Notification Popup Timeout"
|
||||
#define APPLICATION_STEAM_ID_STRING L"Steam Application ID"
|
||||
#define BATTERY_BOOST_APP_FPS_STRING L"Battery Boost Application FPS"
|
||||
@@ -86,6 +77,22 @@
|
||||
#define FXAA_INDICATOR_ENABLE_STRING L"Enable FXAA Indicator"
|
||||
#define LATENCY_INDICATOR_AUTOALIGN_STRING L"Autoalign flash indicator"
|
||||
#define MCSFRSHOWSPLIT_STRING L"SLI indicator"
|
||||
#define NGX_DLAA_OVERRIDE_STRING L"Override DLSS mode to be DLAA"
|
||||
#define NGX_DLSSG_MULTI_FRAME_COUNT_STRING L"Override DLSSG multi-frame count"
|
||||
#define NGX_DLSS_FG_OVERRIDE_STRING L"Enable DLSS-FG override"
|
||||
#define NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_STRING L"Override reserved key 1 for FG"
|
||||
#define NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_STRING L"Override reserved key 2 for FG"
|
||||
#define NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_STRING L"Override DLSS performance mode to be ultra-perfomance"
|
||||
#define NGX_DLSS_RR_MODE_STRING L"Override DLSS-RR performance mode"
|
||||
#define NGX_DLSS_RR_OVERRIDE_STRING L"Enable DLSS-RR override"
|
||||
#define NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_STRING L"Override DLSS-RR preset"
|
||||
#define NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_STRING L"Override reserved key 1 for RR"
|
||||
#define NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_STRING L"Override reserved key 2 for RR"
|
||||
#define NGX_DLSS_SR_MODE_STRING L"Override DLSS-SR performance mode"
|
||||
#define NGX_DLSS_SR_OVERRIDE_STRING L"Enable DLSS-SR override"
|
||||
#define NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_STRING L"Override DLSS-SR presets"
|
||||
#define NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_STRING L"Override reserved key 1 for SR"
|
||||
#define NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_STRING L"Override reserved key 2 for SR"
|
||||
#define NV_QUALITY_UPSCALING_STRING L"NVIDIA Quality upscaling"
|
||||
#define OPTIMUS_MAXAA_STRING L"Maximum AA samples allowed for a given application"
|
||||
#define PHYSXINDICATOR_STRING L"Display the PhysX indicator"
|
||||
@@ -113,7 +120,6 @@
|
||||
#define VSYNC_BEHAVIOR_FLAGS_STRING L"Vsync - Behavior Flags"
|
||||
#define WKS_API_STEREO_EYES_EXCHANGE_STRING L"Stereo - Swap eyes"
|
||||
#define WKS_API_STEREO_MODE_STRING L"Stereo - Display mode"
|
||||
#define WKS_MEMORY_ALLOCATION_POLICY_STRING L"Memory Allocation Policy"
|
||||
#define WKS_STEREO_DONGLE_SUPPORT_STRING L"Stereo - Dongle Support"
|
||||
#define WKS_STEREO_SUPPORT_STRING L"Stereo - Enable"
|
||||
#define WKS_STEREO_SWAP_MODE_STRING L"Stereo - swap mode"
|
||||
@@ -126,6 +132,7 @@
|
||||
#define MAXWELL_B_SAMPLE_INTERLEAVE_STRING L"Enable sample interleaving (MFAA)"
|
||||
#define PRERENDERLIMIT_STRING L"Maximum pre-rendered frames"
|
||||
#define PS_SHADERDISKCACHE_STRING L"Shader Cache"
|
||||
#define PS_SHADERDISKCACHE_DLL_PATH_WCHAR_STRING L"shader cache path to dll"
|
||||
#define PS_SHADERDISKCACHE_MAX_SIZE_STRING L"Shader disk cache maximum size"
|
||||
#define PS_TEXFILTER_ANISO_OPTS2_STRING L"Texture filtering - Anisotropic sample optimization"
|
||||
#define PS_TEXFILTER_BILINEAR_IN_ANISO_STRING L"Texture filtering - Anisotropic filter optimization"
|
||||
@@ -141,6 +148,8 @@
|
||||
|
||||
enum ESetting {
|
||||
OGL_AA_LINE_GAMMA_ID = 0x2089BF6C,
|
||||
OGL_CPL_GDI_COMPATIBILITY_ID = 0x2072C5A3,
|
||||
OGL_CPL_PREFER_DXPRESENT_ID = 0x20D690F8,
|
||||
OGL_DEEP_COLOR_SCANOUT_ID = 0x2097C2F6,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_ID = 0x206A6582,
|
||||
OGL_DEFAULT_SWAP_INTERVAL_FRACTIONAL_ID = 0x206C4581,
|
||||
@@ -155,7 +164,6 @@ enum ESetting {
|
||||
OGL_OVERLAY_SUPPORT_ID = 0x206C28C4,
|
||||
OGL_QUALITY_ENHANCEMENTS_ID = 0x20797D6C,
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_ID = 0x20A29055,
|
||||
OGL_SLI_CFR_MODE_ID = 0x20343843,
|
||||
OGL_SLI_MULTICAST_ID = 0x2092D3BE,
|
||||
OGL_THREAD_CONTROL_ID = 0x20C1221E,
|
||||
OGL_TMON_LEVEL_ID = 0x202888C1,
|
||||
@@ -172,6 +180,8 @@ enum ESetting {
|
||||
ANSEL_ALLOW_ID = 0x1035DB89,
|
||||
ANSEL_ALLOWLISTED_ID = 0x1085DA8A,
|
||||
ANSEL_ENABLE_ID = 0x1075D972,
|
||||
APPIDLE_DYNAMIC_FRL_FPS_ID = 0x10835016,
|
||||
APPIDLE_DYNAMIC_FRL_THRESHOLD_TIME_ID = 0x10835017,
|
||||
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ID = 0x104554B6,
|
||||
APPLICATION_STEAM_ID_ID = 0x107CDDBC,
|
||||
BATTERY_BOOST_APP_FPS_ID = 0x10115C8C,
|
||||
@@ -186,6 +196,22 @@ enum ESetting {
|
||||
FXAA_INDICATOR_ENABLE_ID = 0x1068FB9C,
|
||||
LATENCY_INDICATOR_AUTOALIGN_ID = 0x1095F170,
|
||||
MCSFRSHOWSPLIT_ID = 0x10287051,
|
||||
NGX_DLAA_OVERRIDE_ID = 0x10E41DF4,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_ID = 0x104D6667,
|
||||
NGX_DLSS_FG_OVERRIDE_ID = 0x10E41E03,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_ID = 0x10C7D57E,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_ID = 0x10C7D519,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_ID = 0x10AFB76C,
|
||||
NGX_DLSS_RR_MODE_ID = 0x10BD9423,
|
||||
NGX_DLSS_RR_OVERRIDE_ID = 0x10E41E02,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_ID = 0x10E41DF7,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_ID = 0x10C7D86C,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_ID = 0x10C7D597,
|
||||
NGX_DLSS_SR_MODE_ID = 0x10AFB768,
|
||||
NGX_DLSS_SR_OVERRIDE_ID = 0x10E41E01,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_ID = 0x10E41DF3,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_ID = 0x10C7D684,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_ID = 0x10C7D82C,
|
||||
NV_QUALITY_UPSCALING_ID = 0x10444444,
|
||||
OPTIMUS_MAXAA_ID = 0x10F9DC83,
|
||||
PHYSXINDICATOR_ID = 0x1094F16F,
|
||||
@@ -213,7 +239,6 @@ enum ESetting {
|
||||
VSYNC_BEHAVIOR_FLAGS_ID = 0x10FDEC23,
|
||||
WKS_API_STEREO_EYES_EXCHANGE_ID = 0x11AE435C,
|
||||
WKS_API_STEREO_MODE_ID = 0x11E91A61,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_ID = 0x11112233,
|
||||
WKS_STEREO_DONGLE_SUPPORT_ID = 0x112493BD,
|
||||
WKS_STEREO_SUPPORT_ID = 0x11AA9E99,
|
||||
WKS_STEREO_SWAP_MODE_ID = 0x11333333,
|
||||
@@ -226,6 +251,7 @@ enum ESetting {
|
||||
MAXWELL_B_SAMPLE_INTERLEAVE_ID = 0x0098C1AC,
|
||||
PRERENDERLIMIT_ID = 0x007BA09E,
|
||||
PS_SHADERDISKCACHE_ID = 0x00198FFF,
|
||||
PS_SHADERDISKCACHE_DLL_PATH_WCHAR_ID = 0x0019A002,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_ID = 0x00AC8497,
|
||||
PS_TEXFILTER_ANISO_OPTS2_ID = 0x00E73211,
|
||||
PS_TEXFILTER_BILINEAR_IN_ANISO_ID = 0x0084CD70,
|
||||
@@ -238,9 +264,9 @@ enum ESetting {
|
||||
SET_VAB_DATA_ID = 0x00AB8687,
|
||||
VSYNCMODE_ID = 0x00A879CF,
|
||||
VSYNCTEARCONTROL_ID = 0x005A375C,
|
||||
TOTAL_DWORD_SETTING_NUM = 94,
|
||||
TOTAL_WSTRING_SETTING_NUM = 4,
|
||||
TOTAL_SETTING_NUM = 98,
|
||||
TOTAL_DWORD_SETTING_NUM = 112,
|
||||
TOTAL_WSTRING_SETTING_NUM = 5,
|
||||
TOTAL_SETTING_NUM = 117,
|
||||
INVALID_SETTING_ID = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
@@ -253,6 +279,22 @@ enum EValues_OGL_AA_LINE_GAMMA {
|
||||
OGL_AA_LINE_GAMMA_DEFAULT = OGL_AA_LINE_GAMMA_DISABLED
|
||||
};
|
||||
|
||||
enum EValues_OGL_CPL_GDI_COMPATIBILITY {
|
||||
OGL_CPL_GDI_COMPATIBILITY_PREFER_DISABLED = 0x00000000,
|
||||
OGL_CPL_GDI_COMPATIBILITY_PREFER_ENABLED = 0x00000001,
|
||||
OGL_CPL_GDI_COMPATIBILITY_AUTO = 0x00000002,
|
||||
OGL_CPL_GDI_COMPATIBILITY_NUM_VALUES = 3,
|
||||
OGL_CPL_GDI_COMPATIBILITY_DEFAULT = OGL_CPL_GDI_COMPATIBILITY_AUTO
|
||||
};
|
||||
|
||||
enum EValues_OGL_CPL_PREFER_DXPRESENT {
|
||||
OGL_CPL_PREFER_DXPRESENT_PREFER_DISABLED = 0x00000000,
|
||||
OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED = 0x00000001,
|
||||
OGL_CPL_PREFER_DXPRESENT_AUTO = 0x00000002,
|
||||
OGL_CPL_PREFER_DXPRESENT_NUM_VALUES = 3,
|
||||
OGL_CPL_PREFER_DXPRESENT_DEFAULT = OGL_CPL_PREFER_DXPRESENT_AUTO
|
||||
};
|
||||
|
||||
enum EValues_OGL_DEEP_COLOR_SCANOUT {
|
||||
OGL_DEEP_COLOR_SCANOUT_DISABLE = 0,
|
||||
OGL_DEEP_COLOR_SCANOUT_ENABLE = 1,
|
||||
@@ -351,14 +393,6 @@ enum EValues_OGL_SINGLE_BACKDEPTH_BUFFER {
|
||||
OGL_SINGLE_BACKDEPTH_BUFFER_DEFAULT = OGL_SINGLE_BACKDEPTH_BUFFER_DISABLE
|
||||
};
|
||||
|
||||
enum EValues_OGL_SLI_CFR_MODE {
|
||||
OGL_SLI_CFR_MODE_DISABLE = 0x00,
|
||||
OGL_SLI_CFR_MODE_ENABLE = 0x01,
|
||||
OGL_SLI_CFR_MODE_CLASSIC_SFR = 0x02,
|
||||
OGL_SLI_CFR_MODE_NUM_VALUES = 3,
|
||||
OGL_SLI_CFR_MODE_DEFAULT = OGL_SLI_CFR_MODE_DISABLE
|
||||
};
|
||||
|
||||
enum EValues_OGL_SLI_MULTICAST {
|
||||
OGL_SLI_MULTICAST_DISABLE = 0x00,
|
||||
OGL_SLI_MULTICAST_ENABLE = 0x01,
|
||||
@@ -664,6 +698,146 @@ enum EValues_MCSFRSHOWSPLIT {
|
||||
MCSFRSHOWSPLIT_DEFAULT = MCSFRSHOWSPLIT_DISABLED
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLAA_OVERRIDE {
|
||||
NGX_DLAA_OVERRIDE_DLAA_DEFAULT = 0,
|
||||
NGX_DLAA_OVERRIDE_DLAA_ON = 1,
|
||||
NGX_DLAA_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLAA_OVERRIDE_DEFAULT = NGX_DLAA_OVERRIDE_DLAA_DEFAULT
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSSG_MULTI_FRAME_COUNT {
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_MIN = 1,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_MAX = 15,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_DEFAULT = 1,
|
||||
NGX_DLSSG_MULTI_FRAME_COUNT_NUM_VALUES = 3,
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_FG_OVERRIDE {
|
||||
NGX_DLSS_FG_OVERRIDE_OFF = 0,
|
||||
NGX_DLSS_FG_OVERRIDE_ON = 1,
|
||||
NGX_DLSS_FG_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLSS_FG_OVERRIDE_DEFAULT = NGX_DLSS_FG_OVERRIDE_OFF
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1 {
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_DEFAULT = 0,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY1_NUM_VALUES = 1,
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2 {
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_DEFAULT = 0,
|
||||
NGX_DLSS_FG_OVERRIDE_RESERVED_KEY2_NUM_VALUES = 1,
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS {
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NONE = 0x0000,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_PERF_TO_9X = 0x0001,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NUM_VALUES = 2,
|
||||
NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_DEFAULT = NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NGX_DLSS_OVERRIDE_OPTIMAL_SETTINGS_NONE
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_RR_MODE {
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_PERFORMANCE = 0,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_BALANCED = 1,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_QUALITY = 2,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_SNIPPET_CONTROLLED = 3,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_DLAA = 4,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_ULTRA_PERFORMANCE = 5,
|
||||
NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_CUSTOM = 6,
|
||||
NGX_DLSS_RR_MODE_NUM_VALUES = 7,
|
||||
NGX_DLSS_RR_MODE_DEFAULT = NGX_DLSS_RR_MODE_NGX_DLSS_RR_MODE_SNIPPET_CONTROLLED
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_RR_OVERRIDE {
|
||||
NGX_DLSS_RR_OVERRIDE_OFF = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_ON = 1,
|
||||
NGX_DLSS_RR_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLSS_RR_OVERRIDE_DEFAULT = NGX_DLSS_RR_OVERRIDE_OFF
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION {
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_OFF = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_A = 1,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_B = 2,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_C = 3,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_D = 4,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_E = 5,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_F = 6,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_G = 7,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_H = 8,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_I = 9,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_J = 10,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_K = 11,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_L = 12,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_M = 13,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_N = 14,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_O = 15,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_Latest = 0x00ffffff,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_NUM_VALUES = 17,
|
||||
NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_DEFAULT = NGX_DLSS_RR_OVERRIDE_RENDER_PRESET_SELECTION_OFF
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1 {
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_DEFAULT = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY1_NUM_VALUES = 1,
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2 {
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_DEFAULT = 0,
|
||||
NGX_DLSS_RR_OVERRIDE_RESERVED_KEY2_NUM_VALUES = 1,
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_SR_MODE {
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_PERFORMANCE = 0,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_BALANCED = 1,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_QUALITY = 2,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_SNIPPET_CONTROLLED = 3,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_DLAA = 4,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_ULTRA_PERFORMANCE = 5,
|
||||
NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_CUSTOM = 6,
|
||||
NGX_DLSS_SR_MODE_NUM_VALUES = 7,
|
||||
NGX_DLSS_SR_MODE_DEFAULT = NGX_DLSS_SR_MODE_NGX_DLSS_SR_MODE_SNIPPET_CONTROLLED
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_SR_OVERRIDE {
|
||||
NGX_DLSS_SR_OVERRIDE_OFF = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_ON = 1,
|
||||
NGX_DLSS_SR_OVERRIDE_NUM_VALUES = 2,
|
||||
NGX_DLSS_SR_OVERRIDE_DEFAULT = NGX_DLSS_SR_OVERRIDE_OFF
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION {
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_OFF = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_A = 1,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_B = 2,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_C = 3,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_D = 4,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_E = 5,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_F = 6,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_G = 7,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_H = 8,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_I = 9,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_J = 10,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_K = 11,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_L = 12,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_M = 13,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_N = 14,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_O = 15,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_RENDER_PRESET_Latest = 0x00ffffff,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_NUM_VALUES = 17,
|
||||
NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_DEFAULT = NGX_DLSS_SR_OVERRIDE_RENDER_PRESET_SELECTION_OFF
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1 {
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_DEFAULT = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY1_NUM_VALUES = 1,
|
||||
};
|
||||
|
||||
enum EValues_NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2 {
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_DEFAULT = 0,
|
||||
NGX_DLSS_SR_OVERRIDE_RESERVED_KEY2_NUM_VALUES = 1,
|
||||
};
|
||||
|
||||
enum EValues_NV_QUALITY_UPSCALING {
|
||||
NV_QUALITY_UPSCALING_OFF = 0,
|
||||
NV_QUALITY_UPSCALING_ON = 1,
|
||||
@@ -706,62 +880,64 @@ enum EValues_PREVENT_UI_AF_OVERRIDE {
|
||||
};
|
||||
|
||||
enum EValues_SHIM_MCCOMPAT {
|
||||
SHIM_MCCOMPAT_INTEGRATED = 0x00000000,
|
||||
SHIM_MCCOMPAT_ENABLE = 0x00000001,
|
||||
SHIM_MCCOMPAT_USER_EDITABLE = 0x00000002,
|
||||
SHIM_MCCOMPAT_MASK = 0x00000003,
|
||||
SHIM_MCCOMPAT_VIDEO_MASK = 0x00000004,
|
||||
SHIM_MCCOMPAT_VARYING_BIT = 0x00000008,
|
||||
SHIM_MCCOMPAT_AUTO_SELECT = 0x00000010,
|
||||
SHIM_MCCOMPAT_OVERRIDE_BIT = 0x80000000,
|
||||
SHIM_MCCOMPAT_INTEGRATED = 0x00000000U,
|
||||
SHIM_MCCOMPAT_ENABLE = 0x00000001U,
|
||||
SHIM_MCCOMPAT_USER_EDITABLE = 0x00000002U,
|
||||
SHIM_MCCOMPAT_MASK = 0x00000003U,
|
||||
SHIM_MCCOMPAT_VIDEO_MASK = 0x00000004U,
|
||||
SHIM_MCCOMPAT_VARYING_BIT = 0x00000008U,
|
||||
SHIM_MCCOMPAT_AUTO_SELECT = 0x00000010U,
|
||||
SHIM_MCCOMPAT_OVERRIDE_BIT = 0x80000000U,
|
||||
SHIM_MCCOMPAT_NUM_VALUES = 8,
|
||||
SHIM_MCCOMPAT_DEFAULT = SHIM_MCCOMPAT_AUTO_SELECT
|
||||
};
|
||||
|
||||
enum EValues_SHIM_RENDERING_MODE {
|
||||
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000,
|
||||
SHIM_RENDERING_MODE_ENABLE = 0x00000001,
|
||||
SHIM_RENDERING_MODE_USER_EDITABLE = 0x00000002,
|
||||
SHIM_RENDERING_MODE_MASK = 0x00000003,
|
||||
SHIM_RENDERING_MODE_VIDEO_MASK = 0x00000004,
|
||||
SHIM_RENDERING_MODE_VARYING_BIT = 0x00000008,
|
||||
SHIM_RENDERING_MODE_AUTO_SELECT = 0x00000010,
|
||||
SHIM_RENDERING_MODE_OVERRIDE_BIT = 0x80000000,
|
||||
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000U,
|
||||
SHIM_RENDERING_MODE_ENABLE = 0x00000001U,
|
||||
SHIM_RENDERING_MODE_USER_EDITABLE = 0x00000002U,
|
||||
SHIM_RENDERING_MODE_MASK = 0x00000003U,
|
||||
SHIM_RENDERING_MODE_VIDEO_MASK = 0x00000004U,
|
||||
SHIM_RENDERING_MODE_VARYING_BIT = 0x00000008U,
|
||||
SHIM_RENDERING_MODE_AUTO_SELECT = 0x00000010U,
|
||||
SHIM_RENDERING_MODE_OVERRIDE_BIT = 0x80000000U,
|
||||
SHIM_RENDERING_MODE_NUM_VALUES = 8,
|
||||
SHIM_RENDERING_MODE_DEFAULT = SHIM_RENDERING_MODE_AUTO_SELECT
|
||||
};
|
||||
|
||||
enum EValues_SHIM_RENDERING_OPTIONS {
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE = 0x00000000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_ASYNC_PRESENT = 0x00000001,
|
||||
SHIM_RENDERING_OPTIONS_EHSHELL_DETECT = 0x00000002,
|
||||
SHIM_RENDERING_OPTIONS_FLASHPLAYER_HOST_DETECT = 0x00000004,
|
||||
SHIM_RENDERING_OPTIONS_VIDEO_DRM_APP_DETECT = 0x00000008,
|
||||
SHIM_RENDERING_OPTIONS_IGNORE_OVERRIDES = 0x00000010,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED1 = 0x00000020,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_DWM_ASYNC_PRESENT = 0x00000040,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED2 = 0x00000080,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_INHERITANCE = 0x00000100,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_WRAPPERS = 0x00000200,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DXGI_WRAPPERS = 0x00000400,
|
||||
SHIM_RENDERING_OPTIONS_PRUNE_UNSUPPORTED_FORMATS = 0x00000800,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_ALPHA_FORMAT = 0x00001000,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING = 0x00002000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_CUDA = 0x00004000,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_CP_CAPS_FOR_VIDEO = 0x00008000,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING_FWD_OPTIMUS = 0x00010000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DURING_SECURE_BOOT = 0x00020000,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_QUADRO = 0x00040000,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_MSHYBRID = 0x00080000,
|
||||
SHIM_RENDERING_OPTIONS_REGISTER_PROCESS_ENABLE_GOLD = 0x00100000,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WINDOWED_MODE_PERF_OPT = 0x00200000,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WIN7_ASYNC_RUNTIME_BUG = 0x00400000,
|
||||
SHIM_RENDERING_OPTIONS_EXPLICIT_ADAPTER_OPTED_BY_APP = 0x00800000,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x01000000,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x02000000,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_TURING_POWER_POLICY = 0x04000000,
|
||||
SHIM_RENDERING_OPTIONS_NUM_VALUES = 28,
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT = 0x00000000
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE = 0x00000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_ASYNC_PRESENT = 0x00000001U,
|
||||
SHIM_RENDERING_OPTIONS_EHSHELL_DETECT = 0x00000002U,
|
||||
SHIM_RENDERING_OPTIONS_FLASHPLAYER_HOST_DETECT = 0x00000004U,
|
||||
SHIM_RENDERING_OPTIONS_VIDEO_DRM_APP_DETECT = 0x00000008U,
|
||||
SHIM_RENDERING_OPTIONS_IGNORE_OVERRIDES = 0x00000010U,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED1 = 0x00000020U,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_DWM_ASYNC_PRESENT = 0x00000040U,
|
||||
SHIM_RENDERING_OPTIONS_RESERVED2 = 0x00000080U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_INHERITANCE = 0x00000100U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_WRAPPERS = 0x00000200U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DXGI_WRAPPERS = 0x00000400U,
|
||||
SHIM_RENDERING_OPTIONS_PRUNE_UNSUPPORTED_FORMATS = 0x00000800U,
|
||||
SHIM_RENDERING_OPTIONS_ENABLE_ALPHA_FORMAT = 0x00001000U,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING = 0x00002000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_CUDA = 0x00004000U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_CP_CAPS_FOR_VIDEO = 0x00008000U,
|
||||
SHIM_RENDERING_OPTIONS_IGPU_TRANSCODING_FWD_OPTIMUS = 0x00010000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_DURING_SECURE_BOOT = 0x00020000U,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_QUADRO = 0x00040000U,
|
||||
SHIM_RENDERING_OPTIONS_INVERT_FOR_MSHYBRID = 0x00080000U,
|
||||
SHIM_RENDERING_OPTIONS_REGISTER_PROCESS_ENABLE_GOLD = 0x00100000U,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WINDOWED_MODE_PERF_OPT = 0x00200000U,
|
||||
SHIM_RENDERING_OPTIONS_HANDLE_WIN7_ASYNC_RUNTIME_BUG = 0x00400000U,
|
||||
SHIM_RENDERING_OPTIONS_EXPLICIT_ADAPTER_OPTED_BY_APP = 0x00800000U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x01000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x02000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISABLE_TURING_POWER_POLICY = 0x04000000U,
|
||||
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH_MDM = 0x08000000U,
|
||||
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH_MDM = 0x10000000U,
|
||||
SHIM_RENDERING_OPTIONS_NUM_VALUES = 30,
|
||||
SHIM_RENDERING_OPTIONS_DEFAULT = 0x00000000U
|
||||
};
|
||||
|
||||
enum EValues_SLI_GPU_COUNT {
|
||||
@@ -944,14 +1120,6 @@ enum EValues_WKS_API_STEREO_MODE {
|
||||
WKS_API_STEREO_MODE_DEFAULT = WKS_API_STEREO_MODE_SHUTTER_GLASSES
|
||||
};
|
||||
|
||||
enum EValues_WKS_MEMORY_ALLOCATION_POLICY {
|
||||
WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED = 0x0,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_MODERATE_PRE_ALLOCATION = 0x1,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_AGGRESSIVE_PRE_ALLOCATION = 0x2,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_NUM_VALUES = 3,
|
||||
WKS_MEMORY_ALLOCATION_POLICY_DEFAULT = WKS_MEMORY_ALLOCATION_POLICY_AS_NEEDED
|
||||
};
|
||||
|
||||
enum EValues_WKS_STEREO_DONGLE_SUPPORT {
|
||||
WKS_STEREO_DONGLE_SUPPORT_OFF = 0,
|
||||
WKS_STEREO_DONGLE_SUPPORT_DAC = 1,
|
||||
@@ -1040,7 +1208,7 @@ enum EValues_PS_SHADERDISKCACHE_MAX_SIZE {
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_MIN = 0x0,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_MAX = 0xffffffff,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_NUM_VALUES = 2,
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_DEFAULT = 0x1000
|
||||
PS_SHADERDISKCACHE_MAX_SIZE_DEFAULT = 0x2000
|
||||
};
|
||||
|
||||
enum EValues_PS_TEXFILTER_ANISO_OPTS2 {
|
||||
@@ -1152,4 +1320,3 @@ typedef struct _SettingWSTRINGNameString {
|
||||
|
||||
|
||||
#endif // _NVAPI_DRIVER_SETTINGS_H_
|
||||
|
||||
|
||||
@@ -344,7 +344,8 @@ namespace nspector.Native.NVAPI2
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
|
||||
internal struct NVDRS_APPLICATION_V3
|
||||
{
|
||||
public uint isMetro { get { return ((uint)((bitvector1 & 1))); } set { bitvector1 = ((uint)((value | bitvector1))); } }
|
||||
public bool isMetro { get { return (bitvector1 & 1) != 0; } set { if (value) bitvector1 |= 1; else bitvector1 &= ~1u; } }
|
||||
public bool isCommandLine { get { return (bitvector1 & 2) != 0; } set { if (value) bitvector1 |= 2; else bitvector1 &= ~2u; } }
|
||||
|
||||
public uint version;
|
||||
public uint isPredefined;
|
||||
@@ -359,6 +360,27 @@ namespace nspector.Native.NVAPI2
|
||||
private uint bitvector1;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
|
||||
internal struct NVDRS_APPLICATION_V4
|
||||
{
|
||||
public bool isMetro { get { return (bitvector1 & 1) != 0; } set { if (value) bitvector1 |= 1; else bitvector1 &= ~1u; } }
|
||||
public bool isCommandLine { get { return (bitvector1 & 2) != 0; } set { if (value) bitvector1 |= 2; else bitvector1 &= ~2u; } }
|
||||
|
||||
public uint version;
|
||||
public uint isPredefined;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
|
||||
public string appName;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
|
||||
public string userFriendlyName;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
|
||||
public string launcher;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
|
||||
public string fileInFolder;
|
||||
private uint bitvector1;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]
|
||||
public string commandLine;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 8, CharSet = CharSet.Unicode)]
|
||||
internal struct NVDRS_PROFILE
|
||||
{
|
||||
@@ -388,7 +410,8 @@ namespace nspector.Native.NVAPI2
|
||||
public static uint NVDRS_APPLICATION_VER_V1 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V1>(1);
|
||||
public static uint NVDRS_APPLICATION_VER_V2 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V2>(2);
|
||||
public static uint NVDRS_APPLICATION_VER_V3 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V3>(3);
|
||||
public static uint NVDRS_APPLICATION_VER = NVDRS_APPLICATION_VER_V3;
|
||||
public static uint NVDRS_APPLICATION_VER_V4 = MAKE_NVAPI_VERSION<NVDRS_APPLICATION_V4>(4);
|
||||
public static uint NVDRS_APPLICATION_VER = NVDRS_APPLICATION_VER_V4;
|
||||
public static uint NVDRS_PROFILE_VER = MAKE_NVAPI_VERSION<NVDRS_PROFILE>(1);
|
||||
|
||||
public const uint OGL_IMPLICIT_GPU_AFFINITY_NUM_VALUES = 1;
|
||||
@@ -549,11 +572,11 @@ namespace nspector.Native.NVAPI2
|
||||
public static readonly DRS_GetNumProfilesDelegate DRS_GetNumProfiles;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate NvAPI_Status DRS_CreateApplicationDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_APPLICATION_V3 pApplication);
|
||||
public delegate NvAPI_Status DRS_CreateApplicationDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_APPLICATION_V4 pApplication);
|
||||
public static readonly DRS_CreateApplicationDelegate DRS_CreateApplication;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate NvAPI_Status DRS_DeleteApplicationExDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_APPLICATION_V3 pApp);
|
||||
public delegate NvAPI_Status DRS_DeleteApplicationExDelegate(IntPtr hSession, IntPtr hProfile, ref NVDRS_APPLICATION_V4 pApp);
|
||||
public static readonly DRS_DeleteApplicationExDelegate DRS_DeleteApplicationEx;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
@@ -561,7 +584,7 @@ namespace nspector.Native.NVAPI2
|
||||
public static readonly DRS_DeleteApplicationDelegate DRS_DeleteApplication;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate NvAPI_Status DRS_GetApplicationInfoDelegate(IntPtr hSession, IntPtr hProfile, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName, ref NVDRS_APPLICATION_V3 pApplication);
|
||||
public delegate NvAPI_Status DRS_GetApplicationInfoDelegate(IntPtr hSession, IntPtr hProfile, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName, ref NVDRS_APPLICATION_V4 pApplication);
|
||||
public static readonly DRS_GetApplicationInfoDelegate DRS_GetApplicationInfo;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
@@ -587,7 +610,7 @@ namespace nspector.Native.NVAPI2
|
||||
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public delegate NvAPI_Status DRS_FindApplicationByNameDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName, ref IntPtr phProfile, ref NVDRS_APPLICATION_V3 pApplication);
|
||||
public delegate NvAPI_Status DRS_FindApplicationByNameDelegate(IntPtr hSession, [MarshalAs(UnmanagedType.LPWStr, SizeConst = (int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX)]StringBuilder appName, ref IntPtr phProfile, ref NVDRS_APPLICATION_V4 pApplication);
|
||||
public static readonly DRS_FindApplicationByNameDelegate DRS_FindApplicationByName;
|
||||
|
||||
public static NvAPI_Status DRS_SetSetting(IntPtr hSession, IntPtr hProfile, ref NVDRS_SETTING pSetting)
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NVIDIA Profile Inspector")]
|
||||
[assembly: AssemblyCopyright("©2022 by Orbmu2k")]
|
||||
[assembly: AssemblyCopyright("©2025 by Orbmu2k")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
26
nspector/Properties/Resources.Designer.cs
generated
26
nspector/Properties/Resources.Designer.cs
generated
@@ -73,19 +73,19 @@ namespace nspector.Properties {
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die <?xml version="1.0" encoding="utf-8"?>
|
||||
///<CustomSettingNames>
|
||||
/// <Settings>
|
||||
/// <CustomSetting>
|
||||
/// <UserfriendlyName>VRR Support Indicator</UserfriendlyName>
|
||||
/// <HexSettingID>0x8df510</HexSettingID>
|
||||
/// <GroupName>2 - Sync and Refresh</GroupName>
|
||||
/// <SettingValues>
|
||||
/// <CustomSettingValue>
|
||||
/// <UserfriendlyName>Off</UserfriendlyName>
|
||||
/// <HexValue>0x00000000</HexValue>
|
||||
/// </CustomSettingValue>
|
||||
/// <CustomSettingValue>
|
||||
/// <UserfriendlyName>On</UserfriendlyName>
|
||||
/// <HexValue>0x0000000 [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt.
|
||||
/// <Settings>
|
||||
/// <CustomSetting>
|
||||
/// <UserfriendlyName>DLSS - Enable DLL Override</UserfriendlyName>
|
||||
/// <HexSettingID>0x10E41E01</HexSettingID>
|
||||
/// <GroupName>5 - Common</GroupName>
|
||||
/// <MinRequiredDriverVersion>0</MinRequiredDriverVersion>
|
||||
/// <SettingValues>
|
||||
/// <CustomSettingValue>
|
||||
/// <UserfriendlyName>Off</UserfriendlyName>
|
||||
/// <HexValue>0x00000000</HexValue>
|
||||
/// </CustomSettingValue>
|
||||
/// <CustomSettingValue>
|
||||
/// <UserfriendlyName>On [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt.
|
||||
/// </summary>
|
||||
public static string CustomSettingNames {
|
||||
get {
|
||||
|
||||
11494
nspector/Reference.xml
11494
nspector/Reference.xml
File diff suppressed because it is too large
Load Diff
34
nspector/WatermarkTextBox.cs
Normal file
34
nspector/WatermarkTextBox.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace nspector
|
||||
{
|
||||
public class WatermarkTextBox : TextBox
|
||||
{
|
||||
private const int WM_PAINT = 0x000F;
|
||||
|
||||
private string _watermarkText;
|
||||
[Category("Appearance")]
|
||||
public string WatermarkText
|
||||
{
|
||||
get => _watermarkText;
|
||||
set { _watermarkText = value; Invalidate(); }
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
base.WndProc(ref m);
|
||||
|
||||
if (m.Msg == WM_PAINT && string.IsNullOrEmpty(this.Text) && !string.IsNullOrEmpty(_watermarkText))
|
||||
{
|
||||
using (Graphics g = this.CreateGraphics())
|
||||
using (Brush brush = new SolidBrush(SystemColors.GrayText))
|
||||
{
|
||||
TextFormatFlags flags = TextFormatFlags.VerticalCenter | TextFormatFlags.Left;
|
||||
TextRenderer.DrawText(g, _watermarkText, this.Font, this.ClientRectangle, SystemColors.GrayText, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/></startup></configuration>
|
||||
|
||||
31
nspector/frmDrvSettings.Designer.cs
generated
31
nspector/frmDrvSettings.Designer.cs
generated
@@ -77,6 +77,7 @@
|
||||
this.chSettingValueHex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.tbSettingDescription = new System.Windows.Forms.TextBox();
|
||||
this.pnlListview = new System.Windows.Forms.Panel();
|
||||
this.txtFilter = new nspector.WatermarkTextBox();
|
||||
this.tsMain.SuspendLayout();
|
||||
this.pnlListview.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@@ -92,7 +93,7 @@
|
||||
//
|
||||
// pbMain
|
||||
//
|
||||
this.pbMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.pbMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pbMain.Location = new System.Drawing.Point(12, 475);
|
||||
this.pbMain.Margin = new System.Windows.Forms.Padding(4);
|
||||
@@ -103,7 +104,7 @@
|
||||
// tsMain
|
||||
//
|
||||
this.tsMain.AllowMerge = false;
|
||||
this.tsMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.tsMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tsMain.AutoSize = false;
|
||||
this.tsMain.BackgroundImage = global::nspector.Properties.Resources.transparent16;
|
||||
@@ -397,7 +398,7 @@
|
||||
//
|
||||
// lblApplications
|
||||
//
|
||||
this.lblApplications.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.lblApplications.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lblApplications.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(185)))), ((int)(((byte)(0)))));
|
||||
this.lblApplications.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
@@ -408,6 +409,7 @@
|
||||
this.lblApplications.Size = new System.Drawing.Size(840, 17);
|
||||
this.lblApplications.TabIndex = 25;
|
||||
this.lblApplications.Text = "fsagame.exe, bond.exe, herozero.exe";
|
||||
this.lblApplications.DoubleClick += new System.EventHandler(this.tsbAddApplication_Click);
|
||||
//
|
||||
// toolStripButton5
|
||||
//
|
||||
@@ -513,6 +515,7 @@
|
||||
this.lvSettings.TabIndex = 2;
|
||||
this.lvSettings.UseCompatibleStateImageBehavior = false;
|
||||
this.lvSettings.View = System.Windows.Forms.View.Details;
|
||||
this.lvSettings.GroupStateChanged += new System.EventHandler<nspector.GroupStateChangedEventArgs>(this.lvSettings_GroupStateChanged);
|
||||
this.lvSettings.ColumnWidthChanging += new System.Windows.Forms.ColumnWidthChangingEventHandler(this.lvSettings_ColumnWidthChanging);
|
||||
this.lvSettings.SelectedIndexChanged += new System.EventHandler(this.lvSettings_SelectedIndexChanged);
|
||||
this.lvSettings.DoubleClick += new System.EventHandler(this.lvSettings_DoubleClick);
|
||||
@@ -548,16 +551,33 @@
|
||||
//
|
||||
// pnlListview
|
||||
//
|
||||
this.pnlListview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
this.pnlListview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlListview.Controls.Add(this.lvSettings);
|
||||
this.pnlListview.Controls.Add(this.txtFilter);
|
||||
this.pnlListview.Controls.Add(this.tbSettingDescription);
|
||||
this.pnlListview.Location = new System.Drawing.Point(12, 52);
|
||||
this.pnlListview.Name = "pnlListview";
|
||||
this.pnlListview.Size = new System.Drawing.Size(840, 416);
|
||||
this.pnlListview.TabIndex = 82;
|
||||
//
|
||||
// txtFilter
|
||||
//
|
||||
this.txtFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.txtFilter.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.txtFilter.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtFilter.Location = new System.Drawing.Point(0, 0);
|
||||
this.txtFilter.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.txtFilter.Name = "txtFilter";
|
||||
this.txtFilter.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None;
|
||||
this.txtFilter.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None;
|
||||
this.txtFilter.Size = new System.Drawing.Size(2118, 35);
|
||||
this.txtFilter.TabIndex = 82;
|
||||
this.txtFilter.WatermarkText = "Search for setting...";
|
||||
this.txtFilter.TextChanged += new System.EventHandler(this.txtFilter_TextChanged);
|
||||
this.txtFilter.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtFilter_KeyUp);
|
||||
//
|
||||
// frmDrvSettings
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -639,5 +659,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox tbSettingDescription;
|
||||
private System.Windows.Forms.Panel pnlListview;
|
||||
private WatermarkTextBox txtFilter;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,9 @@ namespace nspector
|
||||
|
||||
public string _CurrentProfile = "";
|
||||
|
||||
private bool isDevMode = false;
|
||||
private bool _isDevMode = false;
|
||||
|
||||
private UserSettings _settings = null;
|
||||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
@@ -78,7 +80,9 @@ namespace nspector
|
||||
{
|
||||
var group = FindOrCreateGroup(setting.GroupName);
|
||||
|
||||
var settingName = isDevMode ? $"0x{setting.SettingId:X8} {setting.SettingText}" : setting.SettingText;
|
||||
var settingName = _isDevMode ? $"0x{setting.SettingId:X8} {setting.SettingText}" : setting.SettingText;
|
||||
if (setting.IsSettingHidden)
|
||||
settingName = "[H] " + settingName;
|
||||
|
||||
var item = new ListViewItem(settingName);
|
||||
item.Tag = setting.SettingId;
|
||||
@@ -153,14 +157,28 @@ namespace nspector
|
||||
_currentProfileSettingItems = _drs.GetSettingsForProfile(_CurrentProfile, GetSettingViewMode(), ref applications);
|
||||
RefreshApplicationsCombosAndText(applications);
|
||||
|
||||
var searchFilter = txtFilter.Text.Trim();
|
||||
|
||||
foreach (var settingItem in _currentProfileSettingItems)
|
||||
{
|
||||
if (settingItem.IsSettingHidden) continue;
|
||||
if (settingItem.IsSettingHidden && !_isDevMode) continue;
|
||||
|
||||
var item = CreateListViewItem(settingItem);
|
||||
|
||||
// Apply search filter if set
|
||||
if (!string.IsNullOrEmpty(searchFilter) &&
|
||||
item.Text.IndexOf(searchFilter, StringComparison.OrdinalIgnoreCase) < 0 &&
|
||||
(settingItem.AlternateNames == null ||
|
||||
settingItem.AlternateNames.IndexOf(searchFilter, StringComparison.OrdinalIgnoreCase) < 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
lvSettings.Items.Add(item);
|
||||
|
||||
var itm = lvSettings.Items.Add(CreateListViewItem(settingItem));
|
||||
if (Debugger.IsAttached && !settingItem.IsApiExposed)
|
||||
{
|
||||
itm.ForeColor = Color.LightCoral;
|
||||
item.ForeColor = Color.LightCoral;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,9 +193,22 @@ namespace nspector
|
||||
}
|
||||
finally
|
||||
{
|
||||
lvSettings.EndUpdate();
|
||||
((ListViewGroupSorter)lvSettings).SortGroups(true);
|
||||
|
||||
foreach (ListViewGroup group in lvSettings.Groups)
|
||||
{
|
||||
if (_settings.HiddenSettingGroups.Contains(group.Header))
|
||||
{
|
||||
lvSettings.SetGroupState(group, ListViewGroupState.Collapsed | ListViewGroupState.Collapsible);
|
||||
}
|
||||
else
|
||||
{
|
||||
lvSettings.SetGroupState(group, ListViewGroupState.Normal | ListViewGroupState.Collapsible);
|
||||
}
|
||||
}
|
||||
|
||||
lvSettings.EndUpdate();
|
||||
|
||||
GC.Collect();
|
||||
for (int i = 0; i < lvSettings.Items.Count; i++)
|
||||
{
|
||||
@@ -270,7 +301,11 @@ namespace nspector
|
||||
|
||||
var referenceSettings = DrsServiceLocator.ReferenceSettings?.Settings.FirstOrDefault(s => s.SettingId == settingid);
|
||||
|
||||
if (string.IsNullOrEmpty(settingMeta.Description) && !(referenceSettings?.HasConstraints ?? false))
|
||||
var description = DlssHelper.ReplaceDlssVersions(settingMeta.Description);
|
||||
if (!string.IsNullOrEmpty(settingMeta.AlternateNames))
|
||||
description = $"Alternate names: {settingMeta.AlternateNames}\r\n{description}";
|
||||
|
||||
if (string.IsNullOrEmpty(description) && !(referenceSettings?.HasConstraints ?? false))
|
||||
{
|
||||
tbSettingDescription.Text = "";
|
||||
tbSettingDescription.Visible = false;
|
||||
@@ -278,7 +313,7 @@ namespace nspector
|
||||
}
|
||||
else
|
||||
{
|
||||
tbSettingDescription.Text = settingMeta.Description;
|
||||
tbSettingDescription.Text = description.Replace("\\r\\n", "\r\n");
|
||||
tbSettingDescription.Visible = true;
|
||||
tbSettingDescription.BackColor = (referenceSettings?.HasConstraints ?? false) ? Color.LightCoral : SystemColors.Control;
|
||||
}
|
||||
@@ -492,12 +527,13 @@ namespace nspector
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTitleVersion()
|
||||
private void SetTitleVersion(bool isUpdateAvailable = false)
|
||||
{
|
||||
var numberFormat = new NumberFormatInfo() { NumberDecimalSeparator = "." };
|
||||
var version = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
var version = Assembly.GetExecutingAssembly().GetName().Version.ToString() + (isUpdateAvailable ? " (update available on GitHub)" : "");
|
||||
var fileVersionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
||||
Text = $"{Application.ProductName} {version} - Geforce {_drs.DriverVersion.ToString("#.00", numberFormat)} - Profile Settings - {fileVersionInfo.LegalCopyright}";
|
||||
var externalCsn = DrsServiceLocator.IsExternalCustomSettings ? " - CSN OVERRIDE!" : "";
|
||||
Text = $"{Application.ProductName} {version} - Geforce {DrsSettingsServiceBase.DriverVersion.ToString("#.00", numberFormat)} - Profile Settings - {fileVersionInfo.LegalCopyright}{externalCsn}";
|
||||
}
|
||||
|
||||
private static void InitMessageFilter(IntPtr handle)
|
||||
@@ -521,6 +557,8 @@ namespace nspector
|
||||
{
|
||||
_skipScan = skipScan;
|
||||
InitializeComponent();
|
||||
lblApplications.Text = "";
|
||||
|
||||
InitTaskbarList();
|
||||
SetupDropFilesNative();
|
||||
SetupToolbar();
|
||||
@@ -528,6 +566,9 @@ namespace nspector
|
||||
|
||||
tscbShowCustomSettingNamesOnly.Checked = showCsnOnly;
|
||||
Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
|
||||
|
||||
// KeyUp has to be set on the inner control for us to receive Enter key...
|
||||
cbProfiles.Control.KeyUp += cbProfiles_KeyUp;
|
||||
}
|
||||
|
||||
public static double ScaleFactor = 1;
|
||||
@@ -536,6 +577,10 @@ namespace nspector
|
||||
{
|
||||
ScaleFactor = lblWidth330.Width / 330;
|
||||
|
||||
// Later Windows versions changed DPI scaling method, check with Graphics and use it if larger
|
||||
using (Graphics g = CreateGraphics())
|
||||
ScaleFactor = Math.Max(ScaleFactor, Math.Max(g.DpiX / 96f, g.DpiY / 96f));
|
||||
|
||||
chSettingID.Width = lblWidth330.Width;
|
||||
chSettingValueHex.Width = lblWidth96.Width;
|
||||
}
|
||||
@@ -580,7 +625,7 @@ namespace nspector
|
||||
tsbModifiedProfiles.Enabled = true;
|
||||
}
|
||||
|
||||
private void frmDrvSettings_Load(object sender, EventArgs e)
|
||||
private async void frmDrvSettings_Load(object sender, EventArgs e)
|
||||
{
|
||||
SetupLayout();
|
||||
SetTitleVersion();
|
||||
@@ -595,6 +640,39 @@ namespace nspector
|
||||
tssbRemoveApplication.Enabled = false;
|
||||
|
||||
InitResetValueTooltip();
|
||||
|
||||
await CheckForUpdatesAsync();
|
||||
}
|
||||
|
||||
private async Task CheckForUpdatesAsync()
|
||||
{
|
||||
// Allow disabling update check in case user doesn't want us to access internet, or just wants to stick to a certain version
|
||||
if (_settings.DisableUpdateCheck || File.Exists(Path.Combine(AppContext.BaseDirectory, "DisableUpdateCheck.txt")))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
bool updateAvailable = await GithubVersionHelper.IsUpdateAvailableAsync();
|
||||
|
||||
if (updateAvailable)
|
||||
{
|
||||
SetTitleVersion(updateAvailable);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Ignore update check failures
|
||||
}
|
||||
}
|
||||
|
||||
private void lvSettings_GroupStateChanged(object sender, GroupStateChangedEventArgs e)
|
||||
{
|
||||
if (e.IsCollapsed && !_settings.HiddenSettingGroups.Contains(e.Group.Header))
|
||||
_settings.HiddenSettingGroups.Add(e.Group.Header);
|
||||
else if (!e.IsCollapsed && _settings.HiddenSettingGroups.Contains(e.Group.Header))
|
||||
_settings.HiddenSettingGroups.Remove(e.Group.Header);
|
||||
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
private void InitResetValueTooltip()
|
||||
@@ -626,6 +704,8 @@ namespace nspector
|
||||
ResetSelectedValue();
|
||||
}
|
||||
|
||||
ToolTip appPathsTooltip = new ToolTip() { InitialDelay = 250 };
|
||||
|
||||
private void ChangeCurrentProfile(string profileName)
|
||||
{
|
||||
if (profileName == GetBaseProfileName() || profileName == _baseProfileName)
|
||||
@@ -635,15 +715,18 @@ namespace nspector
|
||||
tsbDeleteProfile.Enabled = false;
|
||||
tsbAddApplication.Enabled = false;
|
||||
tssbRemoveApplication.Enabled = false;
|
||||
appPathsTooltip.SetToolTip(lblApplications, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
_CurrentProfile = cbProfiles.Text;
|
||||
_CurrentProfile = profileName;
|
||||
tsbDeleteProfile.Enabled = true;
|
||||
tsbAddApplication.Enabled = true;
|
||||
tssbRemoveApplication.Enabled = true;
|
||||
appPathsTooltip.SetToolTip(lblApplications, "Double-click to add application");
|
||||
}
|
||||
|
||||
txtFilter.Text = "";
|
||||
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
@@ -654,6 +737,26 @@ namespace nspector
|
||||
{
|
||||
ChangeCurrentProfile(cbProfiles.Text);
|
||||
}
|
||||
lvSettings.Focus(); // Unfocus cbProfiles to fix toolstrip hover highlight
|
||||
}
|
||||
|
||||
private void cbProfiles_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(e.KeyCode == Keys.Enter)
|
||||
{
|
||||
// KeyUp event is only fired when combobox item doesn't exist with the entered text
|
||||
// Try searching for text as an exe/application name
|
||||
try
|
||||
{
|
||||
var profile = _drs.GetProfileNameByExeName(cbProfiles.Text);
|
||||
if (!string.IsNullOrEmpty(profile))
|
||||
{
|
||||
cbProfiles.Text = profile;
|
||||
ChangeCurrentProfile(profile);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTaskbarProgress(int progress)
|
||||
@@ -805,7 +908,15 @@ namespace nspector
|
||||
}
|
||||
}
|
||||
else
|
||||
ResetCurrentProfile();
|
||||
{
|
||||
if (MessageBox.Show(this,
|
||||
"Restore profile to NVIDIA driver defaults?",
|
||||
"Restore profile",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
ResetCurrentProfile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tsbRefreshProfile_Click(object sender, EventArgs e)
|
||||
@@ -901,7 +1012,7 @@ namespace nspector
|
||||
}
|
||||
else if (MessageBox.Show(this, "Really delete this profile?\r\n\r\nNote: NVIDIA predefined profiles can not be restored until next driver installation!", "Delete Profile", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
|
||||
{
|
||||
if (_drs.DriverVersion > 280 && _drs.DriverVersion < 310)
|
||||
if (DrsSettingsServiceBase.DriverVersion > 280 && DrsSettingsServiceBase.DriverVersion < 310)
|
||||
// hack for driverbug
|
||||
_drs.DeleteProfileHard(_CurrentProfile);
|
||||
else
|
||||
@@ -916,15 +1027,24 @@ namespace nspector
|
||||
|
||||
private void tsbAddApplication_Click(object sender, EventArgs e)
|
||||
{
|
||||
var openDialog = new OpenFileDialog();
|
||||
openDialog.DefaultExt = "*.exe";
|
||||
openDialog.Filter = "Application EXE Name|*.exe|Application Absolute Path|*.exe";
|
||||
if (_CurrentProfile == GetBaseProfileName() || _CurrentProfile == _baseProfileName)
|
||||
return;
|
||||
|
||||
if (openDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
var applications = new Dictionary<string, string>();
|
||||
_currentProfileSettingItems = _drs.GetSettingsForProfile(_CurrentProfile, GetSettingViewMode(), ref applications);
|
||||
|
||||
var existingPaths = new HashSet<string>(applications.Values, StringComparer.OrdinalIgnoreCase);
|
||||
var applicationName = "";
|
||||
|
||||
if (InputBox.Show("Add Application", "Enter an application path/filename/UWP ID to add to the profile:", ref applicationName, new List<string>(), "", 2048, true) == DialogResult.OK)
|
||||
{
|
||||
string applicationName = new FileInfo(openDialog.FileName).Name;
|
||||
if (openDialog.FilterIndex == 2)
|
||||
applicationName = openDialog.FileName;
|
||||
// Add new application path
|
||||
if (existingPaths.Contains(applicationName))
|
||||
{
|
||||
MessageBox.Show("This application is already assigned to this profile!",
|
||||
"Error adding Application", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -935,25 +1055,26 @@ namespace nspector
|
||||
if (ex.Status == Native.NVAPI2.NvAPI_Status.NVAPI_EXECUTABLE_ALREADY_IN_USE || ex.Status == Native.NVAPI2.NvAPI_Status.NVAPI_ERROR)
|
||||
{
|
||||
if (lblApplications.Text.ToUpper().IndexOf(" " + applicationName.ToUpper() + ",") != -1)
|
||||
MessageBox.Show("This application executable is already assigned to this profile!",
|
||||
MessageBox.Show("This application is already assigned to this profile!",
|
||||
"Error adding Application", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
else
|
||||
{
|
||||
string profileNames = _scanner.FindProfilesUsingApplication(applicationName);
|
||||
if (profileNames == "")
|
||||
MessageBox.Show("This application executable might already be assigned to another profile!",
|
||||
MessageBox.Show("This application might already be assigned to another profile!",
|
||||
"Error adding Application", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
else
|
||||
MessageBox.Show(
|
||||
"This application executable is already assigned to the following profiles: " +
|
||||
"This application is already assigned to the following profiles: " +
|
||||
profileNames, "Error adding Application", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw;
|
||||
}
|
||||
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
|
||||
private void tssbRemoveApplication_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
|
||||
@@ -1078,6 +1199,8 @@ namespace nspector
|
||||
|
||||
private async void RefreshAll()
|
||||
{
|
||||
txtFilter.Text = "";
|
||||
|
||||
RefreshProfilesCombo();
|
||||
await ScanProfilesSilentAsync(true, false);
|
||||
|
||||
@@ -1164,7 +1287,6 @@ namespace nspector
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var profileName = "";
|
||||
var exeFile = ShortcutResolver.ResolveExecuteable(files[0], out profileName);
|
||||
if (exeFile != "")
|
||||
@@ -1194,7 +1316,7 @@ namespace nspector
|
||||
|
||||
private void lvSettings_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (isDevMode && lvSettings.SelectedItems != null && lvSettings.SelectedItems.Count == 1)
|
||||
if (_isDevMode && lvSettings.SelectedItems != null && lvSettings.SelectedItems.Count == 1)
|
||||
{
|
||||
var settingId = ((uint)lvSettings.SelectedItems[0].Tag);
|
||||
var settingName = lvSettings.SelectedItems[0].Text;
|
||||
@@ -1222,36 +1344,36 @@ namespace nspector
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
var settings = UserSettings.LoadSettings();
|
||||
|
||||
if(_settings == null)
|
||||
_settings = UserSettings.LoadSettings();
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
settings.WindowTop = Top;
|
||||
settings.WindowLeft = Left;
|
||||
settings.WindowHeight = Height;
|
||||
settings.WindowWidth = Width;
|
||||
_settings.WindowTop = Top;
|
||||
_settings.WindowLeft = Left;
|
||||
_settings.WindowHeight = Height;
|
||||
_settings.WindowWidth = Width;
|
||||
}
|
||||
else
|
||||
{
|
||||
settings.WindowTop = RestoreBounds.Top;
|
||||
settings.WindowLeft = RestoreBounds.Left;
|
||||
settings.WindowHeight = RestoreBounds.Height;
|
||||
settings.WindowWidth = RestoreBounds.Width;
|
||||
_settings.WindowTop = RestoreBounds.Top;
|
||||
_settings.WindowLeft = RestoreBounds.Left;
|
||||
_settings.WindowHeight = RestoreBounds.Height;
|
||||
_settings.WindowWidth = RestoreBounds.Width;
|
||||
}
|
||||
settings.WindowState = WindowState;
|
||||
settings.ShowCustomizedSettingNamesOnly = tscbShowCustomSettingNamesOnly.Checked;
|
||||
settings.ShowScannedUnknownSettings = tscbShowScannedUnknownSettings.Checked;
|
||||
settings.SaveSettings();
|
||||
_settings.WindowState = WindowState;
|
||||
_settings.ShowCustomizedSettingNamesOnly = tscbShowCustomSettingNamesOnly.Checked;
|
||||
_settings.ShowScannedUnknownSettings = tscbShowScannedUnknownSettings.Checked;
|
||||
_settings.SaveSettings();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
var settings = UserSettings.LoadSettings();
|
||||
SetBounds(settings.WindowLeft, settings.WindowTop, settings.WindowWidth, settings.WindowHeight);
|
||||
WindowState = settings.WindowState != FormWindowState.Minimized ? settings.WindowState : FormWindowState.Normal;
|
||||
_settings = UserSettings.LoadSettings();
|
||||
SetBounds(_settings.WindowLeft, _settings.WindowTop, _settings.WindowWidth, _settings.WindowHeight);
|
||||
WindowState = _settings.WindowState != FormWindowState.Minimized ? _settings.WindowState : FormWindowState.Normal;
|
||||
HandleScreenConstraints();
|
||||
tscbShowCustomSettingNamesOnly.Checked = settings.ShowCustomizedSettingNamesOnly;
|
||||
tscbShowScannedUnknownSettings.Checked = !_skipScan && settings.ShowScannedUnknownSettings;
|
||||
tscbShowCustomSettingNamesOnly.Checked = _settings.ShowCustomizedSettingNamesOnly;
|
||||
tscbShowScannedUnknownSettings.Checked = !_skipScan && _settings.ShowScannedUnknownSettings;
|
||||
}
|
||||
|
||||
private void frmDrvSettings_FormClosed(object sender, FormClosedEventArgs e)
|
||||
@@ -1267,54 +1389,74 @@ namespace nspector
|
||||
CopyModifiedSettingsToClipBoard();
|
||||
}
|
||||
|
||||
if (e.Control && e.Alt && e.KeyCode == Keys.D)
|
||||
else if (e.Control && e.Alt && e.KeyCode == Keys.D)
|
||||
{
|
||||
EnableDevmode();
|
||||
ToggleDevMode();
|
||||
}
|
||||
|
||||
if (Debugger.IsAttached && e.Control && e.KeyCode == Keys.T)
|
||||
else if (Debugger.IsAttached && e.Control && e.KeyCode == Keys.T)
|
||||
{
|
||||
TestStoreSettings();
|
||||
}
|
||||
|
||||
if (e.Control && e.KeyCode == Keys.F)
|
||||
else if (e.Control && e.KeyCode == Keys.F)
|
||||
{
|
||||
SearchSetting();
|
||||
txtFilter.Focus();
|
||||
}
|
||||
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
else if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
txtFilter.Text = "";
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void SearchSetting()
|
||||
{
|
||||
string inputString = "";
|
||||
if (InputBox.Show("Search Setting", "Please enter setting name:", ref inputString, new List<string>(), "", 2048) == System.Windows.Forms.DialogResult.OK)
|
||||
else if (!e.Control && (e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z ||
|
||||
e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9 ||
|
||||
e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9 ||
|
||||
e.KeyCode == Keys.Space || e.KeyCode == Keys.OemPeriod ||
|
||||
e.KeyCode == Keys.Back))
|
||||
{
|
||||
var lowerInput = inputString.Trim().ToLowerInvariant();
|
||||
lvSettings.BeginUpdate();
|
||||
foreach(ListViewItem itm in lvSettings.Items)
|
||||
txtFilter.Focus();
|
||||
if (e.KeyCode == Keys.Back)
|
||||
{
|
||||
if (!itm.Text.ToLowerInvariant().Contains(lowerInput))
|
||||
if (txtFilter.Text.Length > 0)
|
||||
{
|
||||
itm.Remove();
|
||||
txtFilter.Text = txtFilter.Text.Substring(0, txtFilter.Text.Length - 1);
|
||||
}
|
||||
}
|
||||
lvSettings.EndUpdate();
|
||||
else
|
||||
{
|
||||
txtFilter.Text += e.Shift ? e.KeyCode.ToString() : e.KeyCode.ToString().ToLower();
|
||||
}
|
||||
txtFilter.SelectionStart = txtFilter.Text.Length;
|
||||
e.SuppressKeyPress = true;
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void EnableDevmode()
|
||||
private async void txtFilter_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
isDevMode = true;
|
||||
lvSettings.Font = new Font("Consolas", 9);
|
||||
cbValues.Font = new Font("Consolas", 9);
|
||||
lvSettings.HeaderStyle = ColumnHeaderStyle.Nonclickable;
|
||||
RefreshCurrentProfile();
|
||||
|
||||
if(!string.IsNullOrEmpty(txtFilter.Text))
|
||||
txtFilter.Focus(); // Setting listbox sometimes steals focus away
|
||||
}
|
||||
|
||||
private void ToggleDevMode()
|
||||
{
|
||||
_isDevMode = !_isDevMode;
|
||||
if (_isDevMode)
|
||||
{
|
||||
lvSettings.Font = new Font("Consolas", 9);
|
||||
cbValues.Font = new Font("Consolas", 9);
|
||||
lvSettings.HeaderStyle = ColumnHeaderStyle.Nonclickable;
|
||||
}
|
||||
else
|
||||
{
|
||||
lvSettings.Font = null;
|
||||
cbValues.Font = null;
|
||||
lvSettings.HeaderStyle = ColumnHeaderStyle.None;
|
||||
}
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
|
||||
@@ -1398,7 +1540,18 @@ namespace nspector
|
||||
}
|
||||
|
||||
Clipboard.SetText(sbSettings.ToString());
|
||||
}
|
||||
|
||||
private void txtFilter_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
txtFilter.Text = "";
|
||||
}
|
||||
else if (e.Control && e.Alt && e.KeyCode == Keys.D)
|
||||
{
|
||||
ToggleDevMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>nspector</RootNamespace>
|
||||
<AssemblyName>nvidiaProfileInspector</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<TargetFrameworkProfile />
|
||||
@@ -123,6 +123,7 @@
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
@@ -135,7 +136,9 @@
|
||||
<Compile Include="Common\DrsSessionScope.cs" />
|
||||
<Compile Include="Common\DrsSettingsMetaService.cs" />
|
||||
<Compile Include="Common\DrsUtil.cs" />
|
||||
<Compile Include="Common\Helper\DlssHelper.cs" />
|
||||
<Compile Include="Common\Helper\DropDownMenuScrollWheelHandler.cs" />
|
||||
<Compile Include="Common\Helper\GithubVersionHelper.cs" />
|
||||
<Compile Include="Common\Helper\ListViewGroupSorter.cs" />
|
||||
<Compile Include="Common\Helper\ShortcutResolver.cs" />
|
||||
<Compile Include="Common\Helper\SteamAppResolver.cs" />
|
||||
@@ -204,6 +207,9 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WatermarkTextBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="frmBitEditor.resx">
|
||||
<DependentUpon>frmBitEditor.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
Reference in New Issue
Block a user