diff --git a/nspector/Common/CustomSettings/CustomSetting.cs b/nspector/Common/CustomSettings/CustomSetting.cs
index 6ba9e95..7ada509 100644
--- a/nspector/Common/CustomSettings/CustomSetting.cs
+++ b/nspector/Common/CustomSettings/CustomSetting.cs
@@ -16,6 +16,8 @@ namespace nspector.Common.CustomSettings
public string OverrideDefault { get; set; }
public float MinRequiredDriverVersion { get; set; }
public bool Hidden { get; set; }
+ public bool HasConstraints { get; set; }
+ public string DataType { get; set; }
public List SettingValues { get; set; }
diff --git a/nspector/Common/DrsScannerService.cs b/nspector/Common/DrsScannerService.cs
index 5af2376..754a7f6 100644
--- a/nspector/Common/DrsScannerService.cs
+++ b/nspector/Common/DrsScannerService.cs
@@ -161,9 +161,8 @@ namespace nspector.Common
private void AddScannedSettingToCache(NVDRS_PROFILE profile, NVDRS_SETTING setting)
{
- // Skip 3D Vision string values here for improved scan performance
- bool allowAddValue = setting.settingId < 0x70000000 || setting.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
-
+ // 3D Vision is dead so dont bother scanning those values for improved scan performance
+ bool allowAddValue = !((setting.settingId & 0x70000000) == 0x70000000);
//bool allowAddValue = true;
var cachedSetting = CachedSettings
@@ -186,6 +185,7 @@ namespace nspector.Common
cachedSetting.AddDwordValue(setting.predefinedValue.dwordValue, profile.profileName);
else if (setting.settingType == NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE)
cachedSetting.AddBinaryValue(setting.predefinedValue.binaryValue, profile.profileName);
+
}
else
cachedSetting.ProfileCount++;
diff --git a/nspector/Common/DrsSettingsMetaService.cs b/nspector/Common/DrsSettingsMetaService.cs
index cbbff7b..2f956bb 100644
--- a/nspector/Common/DrsSettingsMetaService.cs
+++ b/nspector/Common/DrsSettingsMetaService.cs
@@ -311,6 +311,7 @@ namespace nspector.Common
IsApiExposed = GetIsApiExposed(settingId),
IsSettingHidden = GetIsSettingHidden(settingId),
+ Description = GetDescription(settingId),
DefaultDwordValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
@@ -352,6 +353,7 @@ namespace nspector.Common
GroupName = settingMeta.GroupName,
IsApiExposed = settingMeta.IsApiExposed,
IsSettingHidden = settingMeta.IsSettingHidden,
+ Description = settingMeta.Description,
};
if (string.IsNullOrEmpty(newMeta.SettingName))
@@ -421,5 +423,16 @@ namespace nspector.Common
var csnMeta = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.CustomSettings);
return (csnMeta != null && ((CustomSettingMetaService)csnMeta.Service).IsSettingHidden(settingId));
}
+
+ private string GetDescription(uint settingId)
+ {
+ var csn = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.CustomSettings);
+ var csnDescription = csn != null ? ((CustomSettingMetaService)csn.Service).GetDescription(settingId) ?? "" : "";
+
+ var refs = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.ReferenceSettings);
+ var refsDescription = refs != null ? ((CustomSettingMetaService)refs.Service).GetDescription(settingId) ?? "" : "";
+
+ return !string.IsNullOrEmpty(csnDescription) ? csnDescription : refsDescription;
+ }
}
}
diff --git a/nspector/Common/DrsSettingsService.cs b/nspector/Common/DrsSettingsService.cs
index 9443c61..bc9e8f6 100644
--- a/nspector/Common/DrsSettingsService.cs
+++ b/nspector/Common/DrsSettingsService.cs
@@ -272,6 +272,39 @@ namespace nspector.Common
removeFromModified = tmpRemoveFromModified;
}
+ public void DeleteValue(string profileName, uint settingId, out bool removeFromModified)
+ {
+ var tmpRemoveFromModified = false;
+
+ DrsSession((hSession) =>
+ {
+ var hProfile = GetProfileHandle(hSession, profileName);
+
+ if (hProfile != IntPtr.Zero)
+ {
+ int dropCount = 0;
+ var settings = GetProfileSettings(hSession, hProfile);
+ foreach (var setting in settings)
+ {
+ if (setting.settingId != settingId) continue;
+
+ if (setting.settingLocation == NVDRS_SETTING_LOCATION.NVDRS_CURRENT_PROFILE_LOCATION)
+ {
+ if (nvw.DRS_DeleteProfileSetting(hSession, hProfile, setting.settingId) == NvAPI_Status.NVAPI_OK)
+ {
+ dropCount++;
+ break;
+ }
+ }
+ }
+ tmpRemoveFromModified = (dropCount == 0);
+ SaveSettings(hSession);
+ }
+ });
+
+ removeFromModified = tmpRemoveFromModified;
+ }
+
public uint GetDwordValueFromProfile(string profileName, uint settingId, bool returnDefaultValue = false, bool forceDedicatedScope = false)
{
return DrsSession((hSession) =>
diff --git a/nspector/Common/DrsUtil.cs b/nspector/Common/DrsUtil.cs
index 7d48560..226e31c 100644
--- a/nspector/Common/DrsUtil.cs
+++ b/nspector/Common/DrsUtil.cs
@@ -53,7 +53,7 @@ namespace nspector.Common
internal static string ParseStringSettingValue(SettingMeta meta, string text)
{
- var valueByName = meta.StringValues.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text));
+ var valueByName = meta.StringValues?.FirstOrDefault(x => x.ValueName != null && x.ValueName.Equals(text));
if (valueByName != null)
return valueByName.Value;
diff --git a/nspector/Common/Meta/CustomSettingMetaService.cs b/nspector/Common/Meta/CustomSettingMetaService.cs
index 997b3f5..4fe6df0 100644
--- a/nspector/Common/Meta/CustomSettingMetaService.cs
+++ b/nspector/Common/Meta/CustomSettingMetaService.cs
@@ -1,5 +1,6 @@
using nspector.Common.CustomSettings;
using nspector.Native.NVAPI2;
+using System;
using System.Collections.Generic;
using System.Linq;
@@ -19,7 +20,26 @@ namespace nspector.Common.Meta
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
- return null;
+ var setting = customSettings.Settings
+ .FirstOrDefault(x => x.SettingId.Equals(settingId));
+
+ return MapType(setting?.DataType);
+ }
+
+ private NVDRS_SETTING_TYPE? MapType(string type)
+ {
+ if (string.IsNullOrEmpty(type)) return null;
+
+ switch(type.ToLower())
+ {
+ case "dword":
+ return NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
+ case "string":
+ return NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE;
+ case "binary":
+ return NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE;
+ default: throw new ArgumentOutOfRangeException(type);
+ }
}
public string GetSettingName(uint settingId)
@@ -109,6 +129,14 @@ namespace nspector.Common.Meta
return setting?.Hidden ?? false;
}
+ public string GetDescription(uint settingId)
+ {
+ var setting = customSettings.Settings
+ .FirstOrDefault(x => x.SettingId.Equals(settingId));
+
+ return setting?.Description;
+ }
+
public SettingMetaSource Source
{
get { return _source; }
diff --git a/nspector/Common/Meta/SettingMeta.cs b/nspector/Common/Meta/SettingMeta.cs
index 2ba7b9f..309c711 100644
--- a/nspector/Common/Meta/SettingMeta.cs
+++ b/nspector/Common/Meta/SettingMeta.cs
@@ -21,6 +21,8 @@ namespace nspector.Common.Meta
public bool IsSettingHidden { get; set; }
+ public string Description { get; set; }
+
public List> StringValues { get; set; }
public List> DwordValues { get; set; }
diff --git a/nspector/CustomSettingNames.xml b/nspector/CustomSettingNames.xml
index b6705e8..d9eb9ee 100644
--- a/nspector/CustomSettingNames.xml
+++ b/nspector/CustomSettingNames.xml
@@ -2,7 +2,7 @@
- Background Application Max Frame Rate
+ Frame Rate Limiter - Background Application
0x10835005
2 - Sync and Refresh
@@ -300,17 +300,18 @@
-
+
rBAR - Options
0X000F00BB
5 - Common
-
+
rBAR - Size Limit
0X000F00FF
5 - Common
+ BINARY
@@ -330,13 +331,30 @@
- Enable DXR (Raytracing)
+ Raytracing - (DXR) Enabled
0X00DE429A
5 - Common
0x00000001
- DXR Disabled
+ RT Disabled
+ 0x00000000
+
+
+ Default
+ 0x00000001
+
+
+
+
+
+ Raytracing - (Vulkan RT) enabled
+ 0x20BC1A2B
+ 5 - Common
+ 0x00000001
+
+
+ RT Disabled
0x00000000
@@ -360,7 +378,7 @@
6 - SLI
- Enable Ansel
+ Ansel - Enabled
0x1075D972
5 - Common
@@ -5163,10 +5181,11 @@
- Ultra Low Latency CPL State
+ Ultra Low Latency - CPL State
0x0005F543
2 - Sync and Refresh
430.00
+ This setting just keeps track of ULL setting for the nvidia control panel. No need to change it.
Off
@@ -5183,7 +5202,7 @@
- Ultra Low Latency
+ Ultra Low Latency - Enabled
0x10835000
2 - Sync and Refresh
430.00
@@ -5199,7 +5218,7 @@
- NVLINK SLI Mode
+ NVLINK - SLI Mode
0x00A06948
6 - SLI
410.00
@@ -5222,7 +5241,7 @@
- Enable Maxwell sample interleaving (MFAA)
+ Antialiasing - MFAA Enabled
0x0098C1AC
3 - Antialiasing
344.11
@@ -5254,23 +5273,23 @@
-
+
+ GSYNC - Indicator Overlay
+ 0x10029538
+ 331.00
+ 2 - Sync and Refresh
+
+
+ Off
+ 0x00000000
+
+
+ On
+ 0x00000001
+
+
+
+
GSYNC - Application Mode
0x1194F158
@@ -5406,7 +5425,7 @@
- Shadercache
+ Shadercache - Enabled
0x00198FFF
337.50
5 - Common
@@ -5441,7 +5460,7 @@
- Vertical Sync Smooth AFR behavior
+ Vertical Sync - Smooth AFR behavior
0x101AE763
310.00
2 - Sync and Refresh
@@ -5511,7 +5530,7 @@
- Toggle FXAA on or off
+ Antialiasing - FXAA Enabled
0x1074C972
300.00
3 - Antialiasing
@@ -5528,7 +5547,7 @@
- Toggle FXAA Indicator on or off
+ Antialiasing - FXAA Indicator Overlay
0x1068FB9C
300.00
3 - Antialiasing
@@ -5545,7 +5564,7 @@
- NVIDIA Predefined FXAA Usage
+ Antialiasing - FXAA Enabled (predefined by NVIDIA)
0x1034CB89
300.00
3 - Antialiasing
@@ -6182,25 +6201,25 @@
- SLI compatibility bits (OGL)
+ SLI - Compatibility bits (OGL)
0x209746C1
1 - Compatibility
- SLI compatibility bits (DX12)
+ SLI - Compatibility bits (DX12)
0x00A04746
1 - Compatibility
- SLI compatibility bits (DX10 + DX11)
+ SLI - Compatibility bits (DX10 + DX11)
0x00A06946
1 - Compatibility
- SLI Mode
+ SLI - Mode
0x0000000F
@@ -6236,13 +6255,13 @@
- SLI compatibility bits
+ SLI - Compatibility bits
0x1095DEF8
1 - Compatibility
- SLI Mode
+ SLI - Mode
0x00000007
@@ -6276,7 +6295,7 @@
- AFR Mode
+ SLI - AFR Mode
0x02430000
@@ -6292,28 +6311,28 @@
- Antialiasing compatibility
+ Antialiasing - Compatibility
0x00D55F7D
1 - Compatibility
- Antialiasing compatibility (DX1x)
+ Antialiasing - Compatibility (DX1x)
0x00E32F8A
1 - Compatibility
- Ambient Occlusion compatibility
+ Ambient Occlusion - Compatibility
0x002C7F45
1 - Compatibility
- Antialiasing - Gamma correction
+ Antialiasing - Gamma Correction
0x107D639D
0x00000002
3 - Antialiasing
@@ -6534,7 +6553,7 @@
- Anisotropic filtering mode
+ Anisotropic Filtering - Mode
0x10D2BB16
4 - Texture Filtering
@@ -6550,7 +6569,7 @@
- Anisotropic filtering setting
+ Anisotropic Filtering - Setting
0x101E61A9
4 - Texture Filtering
@@ -6590,7 +6609,7 @@
- Texture filtering - Anisotropic filter optimization
+ Anisotropic Filter - Optimization
0x0084CD70
4 - Texture Filtering
@@ -6606,7 +6625,7 @@
- Texture filtering - Anisotropic sample optimization
+ Anisotropic Filter - Sample Optimization
0x00E73211
4 - Texture Filtering
@@ -6622,7 +6641,7 @@
- Texture filtering - Negative LOD bias
+ Texture Filtering - Negative LOD bias
0x0019BB68
4 - Texture Filtering
@@ -6638,7 +6657,7 @@
- Texture filtering - Quality
+ Texture Filtering - Quality
0x00CE2691
4 - Texture Filtering
@@ -6662,7 +6681,7 @@
- Texture filtering - Trilinear optimization
+ Texture Filtering - Trilinear optimization
0x002ECAF2
4 - Texture Filtering
@@ -6678,7 +6697,7 @@
- Ambient Occlusion usage
+ Ambient Occlusion - Usage
0x00664339
5 - Common
@@ -6694,7 +6713,7 @@
- Ambient Occlusion setting
+ Ambient Occlusion - Setting
0x00667329
5 - Common
@@ -6762,7 +6781,7 @@
- Threaded optimization
+ Threaded Optimization
0x20C1221E
5 - Common
@@ -6782,7 +6801,7 @@
- Triple buffering
+ Triple Buffering
0x20FDD1F9
2 - Sync and Refresh
@@ -6834,7 +6853,7 @@
- Vertical Sync Tear Control
+ Vertical Sync - Tear Control
0x005A375C
300.00
2 - Sync and Refresh
@@ -6851,7 +6870,7 @@
- Show PhysX Visual Indicator
+ PhysX - Indicator Overlay
0x1094F16F
5 - Common
@@ -6867,7 +6886,7 @@
- Power management mode
+ Power Management - Mode
0x1057EB71
5 - Common
@@ -6903,22 +6922,6 @@
-
Extension limit
0x20FF7493
diff --git a/nspector/frmBitEditor.Designer.cs b/nspector/frmBitEditor.Designer.cs
index ce206f3..bc0024a 100644
--- a/nspector/frmBitEditor.Designer.cs
+++ b/nspector/frmBitEditor.Designer.cs
@@ -49,10 +49,10 @@
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnClose.Location = new System.Drawing.Point(914, 806);
- this.btnClose.Margin = new System.Windows.Forms.Padding(4);
+ this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnClose.Location = new System.Drawing.Point(731, 645);
this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(132, 29);
+ this.btnClose.Size = new System.Drawing.Size(106, 23);
this.btnClose.TabIndex = 1;
this.btnClose.Text = "Apply && Close";
this.btnClose.UseVisualStyleBackColor = true;
@@ -62,10 +62,9 @@
//
this.lValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lValue.AutoSize = true;
- this.lValue.Location = new System.Drawing.Point(21, 813);
- this.lValue.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.lValue.Location = new System.Drawing.Point(17, 650);
this.lValue.Name = "lValue";
- this.lValue.Size = new System.Drawing.Size(48, 17);
+ this.lValue.Size = new System.Drawing.Size(37, 13);
this.lValue.TabIndex = 2;
this.lValue.Text = "Value:";
//
@@ -73,10 +72,9 @@
//
this.lFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lFilter.AutoSize = true;
- this.lFilter.Location = new System.Drawing.Point(187, 813);
- this.lFilter.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.lFilter.Location = new System.Drawing.Point(150, 650);
this.lFilter.Name = "lFilter";
- this.lFilter.Size = new System.Drawing.Size(87, 17);
+ this.lFilter.Size = new System.Drawing.Size(64, 13);
this.lFilter.TabIndex = 23;
this.lFilter.Text = "Profile Filter:";
//
@@ -84,20 +82,18 @@
//
this.tbFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.tbFilter.Location = new System.Drawing.Point(274, 809);
- this.tbFilter.Margin = new System.Windows.Forms.Padding(4);
+ this.tbFilter.Location = new System.Drawing.Point(219, 647);
this.tbFilter.Name = "tbFilter";
- this.tbFilter.Size = new System.Drawing.Size(632, 22);
+ this.tbFilter.Size = new System.Drawing.Size(506, 20);
this.tbFilter.TabIndex = 24;
this.tbFilter.TextChanged += new System.EventHandler(this.tbFilter_TextChanged);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.textBox1.Location = new System.Drawing.Point(74, 809);
- this.textBox1.Margin = new System.Windows.Forms.Padding(4);
+ this.textBox1.Location = new System.Drawing.Point(59, 647);
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(86, 22);
+ this.textBox1.Size = new System.Drawing.Size(70, 20);
this.textBox1.TabIndex = 31;
this.textBox1.Text = "0x00FF00FF";
this.textBox1.Leave += new System.EventHandler(this.textBox1_Leave);
@@ -106,10 +102,9 @@
// btnDirectApplyStart
//
this.btnDirectApplyStart.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btnDirectApplyStart.Location = new System.Drawing.Point(6, 19);
- this.btnDirectApplyStart.Margin = new System.Windows.Forms.Padding(4);
+ this.btnDirectApplyStart.Location = new System.Drawing.Point(5, 15);
this.btnDirectApplyStart.Name = "btnDirectApplyStart";
- this.btnDirectApplyStart.Size = new System.Drawing.Size(105, 42);
+ this.btnDirectApplyStart.Size = new System.Drawing.Size(84, 34);
this.btnDirectApplyStart.TabIndex = 32;
this.btnDirectApplyStart.Text = "GO!";
this.btnDirectApplyStart.UseVisualStyleBackColor = true;
@@ -123,11 +118,9 @@
this.gbDirectTest.Controls.Add(this.tbGamePath);
this.gbDirectTest.Controls.Add(this.lblGamePath);
this.gbDirectTest.Controls.Add(this.btnDirectApplyStart);
- this.gbDirectTest.Location = new System.Drawing.Point(18, 733);
- this.gbDirectTest.Margin = new System.Windows.Forms.Padding(4);
+ this.gbDirectTest.Location = new System.Drawing.Point(14, 586);
this.gbDirectTest.Name = "gbDirectTest";
- this.gbDirectTest.Padding = new System.Windows.Forms.Padding(4);
- this.gbDirectTest.Size = new System.Drawing.Size(1029, 66);
+ this.gbDirectTest.Size = new System.Drawing.Size(823, 53);
this.gbDirectTest.TabIndex = 33;
this.gbDirectTest.TabStop = false;
this.gbDirectTest.Text = "Quick Bit Value Tester (stores this setting value to the current profile and imme" +
@@ -136,10 +129,9 @@
// btnBrowseGame
//
this.btnBrowseGame.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnBrowseGame.Location = new System.Drawing.Point(971, 24);
- this.btnBrowseGame.Margin = new System.Windows.Forms.Padding(4);
+ this.btnBrowseGame.Location = new System.Drawing.Point(777, 19);
this.btnBrowseGame.Name = "btnBrowseGame";
- this.btnBrowseGame.Size = new System.Drawing.Size(41, 29);
+ this.btnBrowseGame.Size = new System.Drawing.Size(33, 23);
this.btnBrowseGame.TabIndex = 35;
this.btnBrowseGame.Text = "...";
this.btnBrowseGame.UseVisualStyleBackColor = true;
@@ -149,19 +141,17 @@
//
this.tbGamePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.tbGamePath.Location = new System.Drawing.Point(218, 26);
- this.tbGamePath.Margin = new System.Windows.Forms.Padding(4);
+ this.tbGamePath.Location = new System.Drawing.Point(174, 21);
this.tbGamePath.Name = "tbGamePath";
- this.tbGamePath.Size = new System.Drawing.Size(745, 22);
+ this.tbGamePath.Size = new System.Drawing.Size(597, 20);
this.tbGamePath.TabIndex = 34;
//
// lblGamePath
//
this.lblGamePath.AutoSize = true;
- this.lblGamePath.Location = new System.Drawing.Point(119, 29);
- this.lblGamePath.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.lblGamePath.Location = new System.Drawing.Point(95, 23);
this.lblGamePath.Name = "lblGamePath";
- this.lblGamePath.Size = new System.Drawing.Size(98, 17);
+ this.lblGamePath.Size = new System.Drawing.Size(73, 13);
this.lblGamePath.TabIndex = 33;
this.lblGamePath.Text = "Game to start:";
//
@@ -179,11 +169,13 @@
this.clbBits.FullRowSelect = true;
this.clbBits.GridLines = true;
this.clbBits.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.clbBits.Location = new System.Drawing.Point(12, 12);
+ this.clbBits.HideSelection = false;
+ this.clbBits.Location = new System.Drawing.Point(10, 10);
+ this.clbBits.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.clbBits.MultiSelect = false;
this.clbBits.Name = "clbBits";
this.clbBits.ShowGroups = false;
- this.clbBits.Size = new System.Drawing.Size(1035, 714);
+ this.clbBits.Size = new System.Drawing.Size(829, 572);
this.clbBits.TabIndex = 34;
this.clbBits.UseCompatibleStateImageBehavior = false;
this.clbBits.View = System.Windows.Forms.View.Details;
@@ -209,9 +201,9 @@
//
// frmBitEditor
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
- this.ClientSize = new System.Drawing.Size(1059, 847);
+ this.ClientSize = new System.Drawing.Size(847, 678);
this.Controls.Add(this.clbBits);
this.Controls.Add(this.gbDirectTest);
this.Controls.Add(this.textBox1);
@@ -220,8 +212,7 @@
this.Controls.Add(this.lValue);
this.Controls.Add(this.btnClose);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
- this.Margin = new System.Windows.Forms.Padding(4);
- this.MinimumSize = new System.Drawing.Size(854, 609);
+ this.MinimumSize = new System.Drawing.Size(686, 495);
this.Name = "frmBitEditor";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Bit Value Editor";
diff --git a/nspector/frmBitEditor.cs b/nspector/frmBitEditor.cs
index 53ff630..10d549c 100644
--- a/nspector/frmBitEditor.cs
+++ b/nspector/frmBitEditor.cs
@@ -52,12 +52,14 @@ namespace nspector
var referenceSettings = DrsServiceLocator.ReferenceSettings?.Settings.FirstOrDefault(s => s.SettingId == _Settingid);
var settingsCache = DrsServiceLocator.ScannerService.CachedSettings.FirstOrDefault(x => x.SettingId == _Settingid);
- if (settingsCache != null)
+
+ for (int bit = 0; bit < 32; bit++)
{
- for (int bit = 0; bit < 32; bit++)
+ string profileNames = "";
+ uint profileCount = 0;
+
+ if (settingsCache != null)
{
- string profileNames = "";
- uint profileCount = 0;
for (int i = 0; i < settingsCache.SettingValues.Count; i++)
{
@@ -84,31 +86,32 @@ namespace nspector
profileCount += settingsCache.SettingValues[i].ValueProfileCount;
}
}
-
- uint mask = (uint)1 << bit;
- string maskStr="";
-
- if (referenceSettings != null)
+ }
+
+ uint mask = (uint)1 << bit;
+ string maskStr = "";
+
+ if (referenceSettings != null)
+ {
+ var maskValue = referenceSettings.SettingValues.FirstOrDefault(v => v.SettingValue == mask);
+ if (maskValue != null)
{
- var maskValue = referenceSettings.SettingValues.FirstOrDefault(v => v.SettingValue == mask);
- if (maskValue != null)
+ maskStr = maskValue.UserfriendlyName;
+ if (maskStr.Contains("("))
{
- maskStr = maskValue.UserfriendlyName;
- if (maskStr.Contains("("))
- {
- maskStr = maskStr.Substring(0, maskStr.IndexOf("(") - 1);
- }
+ maskStr = maskStr.Substring(0, maskStr.IndexOf("(") - 1);
}
}
+ }
- clbBits.Items.Add(new ListViewItem(new string[] {
+ clbBits.Items.Add(new ListViewItem(new string[] {
string.Format("#{0:00}",bit),
maskStr,
profileCount.ToString(),
profileNames,
}));
-
- }
+
+
}
SetValue(lastValue);
diff --git a/nspector/frmDrvSettings.Designer.cs b/nspector/frmDrvSettings.Designer.cs
index 89273d9..dea573c 100644
--- a/nspector/frmDrvSettings.Designer.cs
+++ b/nspector/frmDrvSettings.Designer.cs
@@ -75,7 +75,10 @@
this.chSettingID = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chSettingValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
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.tsMain.SuspendLayout();
+ this.pnlListview.SuspendLayout();
this.SuspendLayout();
//
// ilListView
@@ -91,10 +94,10 @@
//
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(16, 585);
- this.pbMain.Margin = new System.Windows.Forms.Padding(5);
+ this.pbMain.Location = new System.Drawing.Point(12, 475);
+ this.pbMain.Margin = new System.Windows.Forms.Padding(4);
this.pbMain.Name = "pbMain";
- this.pbMain.Size = new System.Drawing.Size(1120, 11);
+ this.pbMain.Size = new System.Drawing.Size(840, 9);
this.pbMain.TabIndex = 19;
//
// tsMain
@@ -132,10 +135,10 @@
this.tsSep6,
this.tsbApplyProfile});
this.tsMain.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
- this.tsMain.Location = new System.Drawing.Point(16, 5);
+ this.tsMain.Location = new System.Drawing.Point(12, 4);
this.tsMain.Name = "tsMain";
this.tsMain.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
- this.tsMain.Size = new System.Drawing.Size(1120, 31);
+ this.tsMain.Size = new System.Drawing.Size(840, 25);
this.tsMain.TabIndex = 24;
this.tsMain.Text = "toolStrip1";
//
@@ -144,7 +147,7 @@
this.tslProfiles.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.tslProfiles.Margin = new System.Windows.Forms.Padding(0, 5, 10, 2);
this.tslProfiles.Name = "tslProfiles";
- this.tslProfiles.Size = new System.Drawing.Size(61, 24);
+ this.tslProfiles.Size = new System.Drawing.Size(49, 18);
this.tslProfiles.Text = "Profiles:";
//
// cbProfiles
@@ -156,7 +159,7 @@
this.cbProfiles.Margin = new System.Windows.Forms.Padding(1);
this.cbProfiles.MaxDropDownItems = 50;
this.cbProfiles.Name = "cbProfiles";
- this.cbProfiles.Size = new System.Drawing.Size(385, 28);
+ this.cbProfiles.Size = new System.Drawing.Size(290, 23);
this.cbProfiles.SelectedIndexChanged += new System.EventHandler(this.cbProfiles_SelectedIndexChanged);
this.cbProfiles.TextChanged += new System.EventHandler(this.cbProfiles_TextChanged);
//
@@ -167,7 +170,7 @@
this.tsbModifiedProfiles.Image = global::nspector.Properties.Resources.home_sm;
this.tsbModifiedProfiles.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbModifiedProfiles.Name = "tsbModifiedProfiles";
- this.tsbModifiedProfiles.Size = new System.Drawing.Size(39, 28);
+ this.tsbModifiedProfiles.Size = new System.Drawing.Size(36, 22);
this.tsbModifiedProfiles.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
this.tsbModifiedProfiles.ToolTipText = "Back to global profile (Home) / User modified profiles";
this.tsbModifiedProfiles.ButtonClick += new System.EventHandler(this.tsbModifiedProfiles_ButtonClick);
@@ -176,7 +179,7 @@
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// tsbRefreshProfile
//
@@ -184,7 +187,7 @@
this.tsbRefreshProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsbRefreshProfile.Image")));
this.tsbRefreshProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRefreshProfile.Name = "tsbRefreshProfile";
- this.tsbRefreshProfile.Size = new System.Drawing.Size(24, 28);
+ this.tsbRefreshProfile.Size = new System.Drawing.Size(24, 22);
this.tsbRefreshProfile.Text = "Refresh current profile.";
this.tsbRefreshProfile.Click += new System.EventHandler(this.tsbRefreshProfile_Click);
//
@@ -194,7 +197,7 @@
this.tsbRestoreProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsbRestoreProfile.Image")));
this.tsbRestoreProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRestoreProfile.Name = "tsbRestoreProfile";
- this.tsbRestoreProfile.Size = new System.Drawing.Size(24, 28);
+ this.tsbRestoreProfile.Size = new System.Drawing.Size(24, 22);
this.tsbRestoreProfile.Text = "Restore current profile to NVIDIA defaults.";
this.tsbRestoreProfile.Click += new System.EventHandler(this.tsbRestoreProfile_Click);
//
@@ -204,7 +207,7 @@
this.tsbCreateProfile.Image = ((System.Drawing.Image)(resources.GetObject("tsbCreateProfile.Image")));
this.tsbCreateProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbCreateProfile.Name = "tsbCreateProfile";
- this.tsbCreateProfile.Size = new System.Drawing.Size(24, 28);
+ this.tsbCreateProfile.Size = new System.Drawing.Size(24, 22);
this.tsbCreateProfile.Text = "Create new profile";
this.tsbCreateProfile.Click += new System.EventHandler(this.tsbCreateProfile_Click);
//
@@ -214,14 +217,14 @@
this.tsbDeleteProfile.Image = global::nspector.Properties.Resources.ieframe_1_18212;
this.tsbDeleteProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbDeleteProfile.Name = "tsbDeleteProfile";
- this.tsbDeleteProfile.Size = new System.Drawing.Size(24, 28);
+ this.tsbDeleteProfile.Size = new System.Drawing.Size(24, 22);
this.tsbDeleteProfile.Text = "Delete current Profile";
this.tsbDeleteProfile.Click += new System.EventHandler(this.tsbDeleteProfile_Click);
//
// tsSep2
//
this.tsSep2.Name = "tsSep2";
- this.tsSep2.Size = new System.Drawing.Size(6, 31);
+ this.tsSep2.Size = new System.Drawing.Size(6, 25);
//
// tsbAddApplication
//
@@ -229,7 +232,7 @@
this.tsbAddApplication.Image = global::nspector.Properties.Resources.window_application_add;
this.tsbAddApplication.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbAddApplication.Name = "tsbAddApplication";
- this.tsbAddApplication.Size = new System.Drawing.Size(24, 28);
+ this.tsbAddApplication.Size = new System.Drawing.Size(24, 22);
this.tsbAddApplication.Text = "Add application to current profile.";
this.tsbAddApplication.Click += new System.EventHandler(this.tsbAddApplication_Click);
//
@@ -239,7 +242,7 @@
this.tssbRemoveApplication.Image = global::nspector.Properties.Resources.window_application_delete;
this.tssbRemoveApplication.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tssbRemoveApplication.Name = "tssbRemoveApplication";
- this.tssbRemoveApplication.Size = new System.Drawing.Size(39, 28);
+ this.tssbRemoveApplication.Size = new System.Drawing.Size(36, 22);
this.tssbRemoveApplication.Text = "Remove application from current profile";
this.tssbRemoveApplication.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.tssbRemoveApplication_DropDownItemClicked);
this.tssbRemoveApplication.Click += new System.EventHandler(this.tssbRemoveApplication_Click);
@@ -247,7 +250,7 @@
// tsSep3
//
this.tsSep3.Name = "tsSep3";
- this.tsSep3.Size = new System.Drawing.Size(6, 31);
+ this.tsSep3.Size = new System.Drawing.Size(6, 25);
//
// tsbExportProfiles
//
@@ -260,35 +263,35 @@
this.tsbExportProfiles.Image = global::nspector.Properties.Resources.export1;
this.tsbExportProfiles.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbExportProfiles.Name = "tsbExportProfiles";
- this.tsbExportProfiles.Size = new System.Drawing.Size(39, 28);
+ this.tsbExportProfiles.Size = new System.Drawing.Size(36, 22);
this.tsbExportProfiles.Text = "Export user defined profiles";
this.tsbExportProfiles.Click += new System.EventHandler(this.tsbExportProfiles_Click);
//
// exportCurrentProfileOnlyToolStripMenuItem
//
this.exportCurrentProfileOnlyToolStripMenuItem.Name = "exportCurrentProfileOnlyToolStripMenuItem";
- this.exportCurrentProfileOnlyToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
+ this.exportCurrentProfileOnlyToolStripMenuItem.Size = new System.Drawing.Size(343, 22);
this.exportCurrentProfileOnlyToolStripMenuItem.Text = "Export current profile only";
this.exportCurrentProfileOnlyToolStripMenuItem.Click += new System.EventHandler(this.exportCurrentProfileOnlyToolStripMenuItem_Click);
//
// exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem
//
this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem.Name = "exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem";
- this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
+ this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem.Size = new System.Drawing.Size(343, 22);
this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem.Text = "Export current profile including predefined settings";
this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem.Click += new System.EventHandler(this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem_Click);
//
// exportUserdefinedProfilesToolStripMenuItem
//
this.exportUserdefinedProfilesToolStripMenuItem.Name = "exportUserdefinedProfilesToolStripMenuItem";
- this.exportUserdefinedProfilesToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
+ this.exportUserdefinedProfilesToolStripMenuItem.Size = new System.Drawing.Size(343, 22);
this.exportUserdefinedProfilesToolStripMenuItem.Text = "Export all customized profiles";
this.exportUserdefinedProfilesToolStripMenuItem.Click += new System.EventHandler(this.exportUserdefinedProfilesToolStripMenuItem_Click);
//
// exportAllProfilesNVIDIATextFormatToolStripMenuItem
//
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Name = "exportAllProfilesNVIDIATextFormatToolStripMenuItem";
- this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
+ this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(343, 22);
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Text = "Export all driver profiles (NVIDIA Text Format)";
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Click += new System.EventHandler(this.exportAllProfilesNVIDIATextFormatToolStripMenuItem_Click);
//
@@ -301,28 +304,28 @@
this.tsbImportProfiles.Image = global::nspector.Properties.Resources.import1;
this.tsbImportProfiles.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbImportProfiles.Name = "tsbImportProfiles";
- this.tsbImportProfiles.Size = new System.Drawing.Size(39, 28);
+ this.tsbImportProfiles.Size = new System.Drawing.Size(36, 22);
this.tsbImportProfiles.Text = "Import user defined profiles";
this.tsbImportProfiles.Click += new System.EventHandler(this.tsbImportProfiles_Click);
//
// importProfilesToolStripMenuItem
//
this.importProfilesToolStripMenuItem.Name = "importProfilesToolStripMenuItem";
- this.importProfilesToolStripMenuItem.Size = new System.Drawing.Size(453, 26);
+ this.importProfilesToolStripMenuItem.Size = new System.Drawing.Size(363, 22);
this.importProfilesToolStripMenuItem.Text = "Import profile(s)";
this.importProfilesToolStripMenuItem.Click += new System.EventHandler(this.importProfilesToolStripMenuItem_Click);
//
// importAllProfilesNVIDIATextFormatToolStripMenuItem
//
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Name = "importAllProfilesNVIDIATextFormatToolStripMenuItem";
- this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(453, 26);
+ this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(363, 22);
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Text = "Import (replace) all driver profiles (NVIDIA Text Format)";
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Click += new System.EventHandler(this.importAllProfilesNVIDIATextFormatToolStripMenuItem_Click);
//
// tsSep4
//
this.tsSep4.Name = "tsSep4";
- this.tsSep4.Size = new System.Drawing.Size(6, 31);
+ this.tsSep4.Size = new System.Drawing.Size(6, 25);
//
// tscbShowCustomSettingNamesOnly
//
@@ -331,14 +334,14 @@
this.tscbShowCustomSettingNamesOnly.Image = global::nspector.Properties.Resources.filter_user;
this.tscbShowCustomSettingNamesOnly.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tscbShowCustomSettingNamesOnly.Name = "tscbShowCustomSettingNamesOnly";
- this.tscbShowCustomSettingNamesOnly.Size = new System.Drawing.Size(24, 28);
+ this.tscbShowCustomSettingNamesOnly.Size = new System.Drawing.Size(24, 22);
this.tscbShowCustomSettingNamesOnly.Text = "Show the settings and values from CustomSettingNames file only.";
this.tscbShowCustomSettingNamesOnly.CheckedChanged += new System.EventHandler(this.cbCustomSettingsOnly_CheckedChanged);
//
// tsSep5
//
this.tsSep5.Name = "tsSep5";
- this.tsSep5.Size = new System.Drawing.Size(6, 31);
+ this.tsSep5.Size = new System.Drawing.Size(6, 25);
//
// tscbShowScannedUnknownSettings
//
@@ -348,7 +351,7 @@
this.tscbShowScannedUnknownSettings.Image = global::nspector.Properties.Resources.find_set2;
this.tscbShowScannedUnknownSettings.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tscbShowScannedUnknownSettings.Name = "tscbShowScannedUnknownSettings";
- this.tscbShowScannedUnknownSettings.Size = new System.Drawing.Size(24, 28);
+ this.tscbShowScannedUnknownSettings.Size = new System.Drawing.Size(24, 22);
this.tscbShowScannedUnknownSettings.Text = "Show unknown settings from NVIDIA predefined profiles";
this.tscbShowScannedUnknownSettings.Click += new System.EventHandler(this.tscbShowScannedUnknownSettings_Click);
//
@@ -358,14 +361,14 @@
this.tsbBitValueEditor.Image = global::nspector.Properties.Resources.text_binary;
this.tsbBitValueEditor.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbBitValueEditor.Name = "tsbBitValueEditor";
- this.tsbBitValueEditor.Size = new System.Drawing.Size(24, 28);
+ this.tsbBitValueEditor.Size = new System.Drawing.Size(24, 22);
this.tsbBitValueEditor.Text = "Show bit value editor.";
this.tsbBitValueEditor.Click += new System.EventHandler(this.tsbBitValueEditor_Click);
//
// tsSep6
//
this.tsSep6.Name = "tsSep6";
- this.tsSep6.Size = new System.Drawing.Size(6, 31);
+ this.tsSep6.Size = new System.Drawing.Size(6, 25);
//
// tsbApplyProfile
//
@@ -374,7 +377,7 @@
this.tsbApplyProfile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbApplyProfile.Name = "tsbApplyProfile";
this.tsbApplyProfile.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
- this.tsbApplyProfile.Size = new System.Drawing.Size(130, 28);
+ this.tsbApplyProfile.Size = new System.Drawing.Size(109, 22);
this.tsbApplyProfile.Text = "Apply changes";
this.tsbApplyProfile.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.tsbApplyProfile.Click += new System.EventHandler(this.tsbApplyProfile_Click);
@@ -384,10 +387,10 @@
this.btnResetValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnResetValue.Enabled = false;
this.btnResetValue.Image = global::nspector.Properties.Resources.nv_btn;
- this.btnResetValue.Location = new System.Drawing.Point(976, 215);
+ this.btnResetValue.Location = new System.Drawing.Point(732, 175);
this.btnResetValue.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
this.btnResetValue.Name = "btnResetValue";
- this.btnResetValue.Size = new System.Drawing.Size(33, 23);
+ this.btnResetValue.Size = new System.Drawing.Size(25, 19);
this.btnResetValue.TabIndex = 7;
this.btnResetValue.UseVisualStyleBackColor = true;
this.btnResetValue.Click += new System.EventHandler(this.btnResetValue_Click);
@@ -399,10 +402,10 @@
this.lblApplications.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(185)))), ((int)(((byte)(0)))));
this.lblApplications.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lblApplications.ForeColor = System.Drawing.Color.White;
- this.lblApplications.Location = new System.Drawing.Point(16, 39);
- this.lblApplications.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.lblApplications.Location = new System.Drawing.Point(12, 32);
+ this.lblApplications.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblApplications.Name = "lblApplications";
- this.lblApplications.Size = new System.Drawing.Size(1120, 21);
+ this.lblApplications.Size = new System.Drawing.Size(840, 17);
this.lblApplications.TabIndex = 25;
this.lblApplications.Text = "fsagame.exe, bond.exe, herozero.exe";
//
@@ -440,10 +443,10 @@
//
this.cbValues.BackColor = System.Drawing.SystemColors.Window;
this.cbValues.FormattingEnabled = true;
- this.cbValues.Location = new System.Drawing.Point(699, 215);
- this.cbValues.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.cbValues.Location = new System.Drawing.Point(524, 175);
+ this.cbValues.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.cbValues.Name = "cbValues";
- this.cbValues.Size = new System.Drawing.Size(95, 24);
+ this.cbValues.Size = new System.Drawing.Size(72, 21);
this.cbValues.TabIndex = 5;
this.cbValues.Visible = false;
this.cbValues.SelectedValueChanged += new System.EventHandler(this.cbValues_SelectedValueChanged);
@@ -451,62 +454,61 @@
//
// lblWidth96
//
- this.lblWidth96.Location = new System.Drawing.Point(103, 287);
- this.lblWidth96.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.lblWidth96.Location = new System.Drawing.Point(77, 233);
+ this.lblWidth96.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth96.Name = "lblWidth96";
- this.lblWidth96.Size = new System.Drawing.Size(128, 22);
+ this.lblWidth96.Size = new System.Drawing.Size(96, 18);
this.lblWidth96.TabIndex = 77;
this.lblWidth96.Text = "96";
this.lblWidth96.Visible = false;
//
// lblWidth330
//
- this.lblWidth330.Location = new System.Drawing.Point(103, 258);
- this.lblWidth330.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.lblWidth330.Location = new System.Drawing.Point(77, 210);
+ this.lblWidth330.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth330.Name = "lblWidth330";
- this.lblWidth330.Size = new System.Drawing.Size(440, 27);
+ this.lblWidth330.Size = new System.Drawing.Size(330, 22);
this.lblWidth330.TabIndex = 78;
this.lblWidth330.Text = "330 (Helper Labels for DPI Scaling)";
this.lblWidth330.Visible = false;
//
// lblWidth16
//
- this.lblWidth16.Location = new System.Drawing.Point(103, 331);
- this.lblWidth16.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.lblWidth16.Location = new System.Drawing.Point(77, 269);
+ this.lblWidth16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth16.Name = "lblWidth16";
- this.lblWidth16.Size = new System.Drawing.Size(21, 22);
+ this.lblWidth16.Size = new System.Drawing.Size(16, 18);
this.lblWidth16.TabIndex = 79;
this.lblWidth16.Text = "16";
this.lblWidth16.Visible = false;
//
// lblWidth30
//
- this.lblWidth30.Location = new System.Drawing.Point(103, 309);
- this.lblWidth30.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
+ this.lblWidth30.Location = new System.Drawing.Point(77, 251);
+ this.lblWidth30.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth30.Name = "lblWidth30";
- this.lblWidth30.Size = new System.Drawing.Size(40, 22);
+ this.lblWidth30.Size = new System.Drawing.Size(30, 18);
this.lblWidth30.TabIndex = 80;
this.lblWidth30.Text = "30";
this.lblWidth30.Visible = false;
//
// lvSettings
//
- this.lvSettings.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.lvSettings.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chSettingID,
this.chSettingValue,
this.chSettingValueHex});
+ this.lvSettings.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvSettings.FullRowSelect = true;
this.lvSettings.GridLines = true;
this.lvSettings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
- this.lvSettings.Location = new System.Drawing.Point(16, 63);
- this.lvSettings.Margin = new System.Windows.Forms.Padding(5);
+ this.lvSettings.HideSelection = false;
+ this.lvSettings.Location = new System.Drawing.Point(0, 0);
+ this.lvSettings.Margin = new System.Windows.Forms.Padding(4);
this.lvSettings.MultiSelect = false;
this.lvSettings.Name = "lvSettings";
this.lvSettings.ShowItemToolTips = true;
- this.lvSettings.Size = new System.Drawing.Size(1119, 514);
+ this.lvSettings.Size = new System.Drawing.Size(840, 372);
this.lvSettings.SmallImageList = this.ilListView;
this.lvSettings.TabIndex = 2;
this.lvSettings.UseCompatibleStateImageBehavior = false;
@@ -514,8 +516,8 @@
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);
- this.lvSettings.Resize += new System.EventHandler(this.lvSettings_Resize);
this.lvSettings.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvSettings_KeyDown);
+ this.lvSettings.Resize += new System.EventHandler(this.lvSettings_Resize);
//
// chSettingID
//
@@ -532,23 +534,47 @@
this.chSettingValueHex.Text = "SettingValueHex";
this.chSettingValueHex.Width = 96;
//
+ // tbSettingDescription
+ //
+ this.tbSettingDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.tbSettingDescription.Location = new System.Drawing.Point(0, 372);
+ this.tbSettingDescription.Multiline = true;
+ this.tbSettingDescription.Name = "tbSettingDescription";
+ this.tbSettingDescription.ReadOnly = true;
+ this.tbSettingDescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.tbSettingDescription.Size = new System.Drawing.Size(840, 44);
+ this.tbSettingDescription.TabIndex = 81;
+ this.tbSettingDescription.Visible = false;
+ //
+ // pnlListview
+ //
+ 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.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;
+ //
// frmDrvSettings
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1152, 606);
+ this.ClientSize = new System.Drawing.Size(864, 492);
+ this.Controls.Add(this.pnlListview);
this.Controls.Add(this.lblWidth30);
this.Controls.Add(this.lblWidth16);
this.Controls.Add(this.lblWidth330);
this.Controls.Add(this.lblWidth96);
- this.Controls.Add(this.lvSettings);
this.Controls.Add(this.lblApplications);
this.Controls.Add(this.tsMain);
this.Controls.Add(this.pbMain);
this.Controls.Add(this.btnResetValue);
this.Controls.Add(this.cbValues);
- this.Margin = new System.Windows.Forms.Padding(5);
- this.MinimumSize = new System.Drawing.Size(1167, 417);
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.MinimumSize = new System.Drawing.Size(879, 346);
this.Name = "frmDrvSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "nSpector - Driver Profile Settings";
@@ -558,6 +584,8 @@
this.Shown += new System.EventHandler(this.frmDrvSettings_Shown);
this.tsMain.ResumeLayout(false);
this.tsMain.PerformLayout();
+ this.pnlListview.ResumeLayout(false);
+ this.pnlListview.PerformLayout();
this.ResumeLayout(false);
}
@@ -609,5 +637,7 @@
private System.Windows.Forms.Label lblWidth16;
private System.Windows.Forms.Label lblWidth30;
private System.Windows.Forms.ToolStripMenuItem exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem;
+ private System.Windows.Forms.TextBox tbSettingDescription;
+ private System.Windows.Forms.Panel pnlListview;
}
}
\ No newline at end of file
diff --git a/nspector/frmDrvSettings.cs b/nspector/frmDrvSettings.cs
index 03858d1..b25202b 100644
--- a/nspector/frmDrvSettings.cs
+++ b/nspector/frmDrvSettings.cs
@@ -39,6 +39,8 @@ namespace nspector
public string _CurrentProfile = "";
+ private bool isDevMode = false;
+
protected override void WndProc(ref Message m)
{
switch (m.Msg)
@@ -76,9 +78,12 @@ namespace nspector
{
var group = FindOrCreateGroup(setting.GroupName);
- var item = new ListViewItem(setting.SettingText);
+ var settingName = isDevMode ? $"0x{setting.SettingId:X8} {setting.SettingText}" : setting.SettingText;
+
+ var item = new ListViewItem(settingName);
item.Tag = setting.SettingId;
item.Group = group;
+
item.SubItems.Add(setting.ValueText);
item.SubItems.Add(setting.ValueRaw);
@@ -212,6 +217,8 @@ namespace nspector
cbValues.BeginUpdate();
+ tsbBitValueEditor.Enabled = false;
+
cbValues.Items.Clear();
cbValues.Tag = lvSettings.SelectedItems[0].Tag;
uint settingid = (uint)lvSettings.SelectedItems[0].Tag;
@@ -233,6 +240,10 @@ namespace nspector
cbValues.Items.Add(itm);
}
+
+ tsbBitValueEditor.Enabled = valueNames.Count > 0;
+
+
}
if (settingMeta.SettingType == Native.NVAPI2.NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE && settingMeta.StringValues != null)
@@ -248,13 +259,6 @@ namespace nspector
foreach (string v in valueNames)
cbValues.Items.Add(v);
}
-
- var scannedCount = settingMeta?.DwordValues?
- .Where(x => x.ValueSource == Common.Meta.SettingMetaSource.ScannedSettings)
- .Count();
-
- tsbBitValueEditor.Enabled = scannedCount > 0;
-
}
if (cbValues.Items.Count < 1)
@@ -264,6 +268,21 @@ namespace nspector
}
+ var referenceSettings = DrsServiceLocator.ReferenceSettings?.Settings.FirstOrDefault(s => s.SettingId == settingid);
+
+ if (string.IsNullOrEmpty(settingMeta.Description) && !(referenceSettings?.HasConstraints ?? false))
+ {
+ tbSettingDescription.Text = "";
+ tbSettingDescription.Visible = false;
+ tbSettingDescription.BackColor = SystemColors.Control;
+ }
+ else
+ {
+ tbSettingDescription.Text = settingMeta.Description;
+ tbSettingDescription.Visible = true;
+ tbSettingDescription.BackColor = (referenceSettings?.HasConstraints ?? false) ? Color.LightCoral : SystemColors.Control;
+ }
+
cbValues.Text = lvSettings.SelectedItems[0].SubItems[1].Text;
cbValues.EndUpdate();
@@ -337,6 +356,7 @@ namespace nspector
valueHasChanged = currentProfileItem.ValueRaw != stringBehind;
}
+
if (valueHasChanged || activeImages.Contains(lvItem.ImageIndex))
{
lvItem.ForeColor = SystemColors.ControlText;
@@ -424,6 +444,22 @@ namespace nspector
}
}
+ private void DeleteSelectedValue()
+ {
+ if (lvSettings.SelectedItems != null && lvSettings.SelectedItems.Count > 0)
+ {
+ var settingId = (uint)lvSettings.SelectedItems[0].Tag;
+
+ bool removeFromModified;
+ _drs.DeleteValue(_CurrentProfile, settingId, out removeFromModified);
+
+ if (removeFromModified)
+ RemoveFromModifiedProfiles(_CurrentProfile);
+
+ RefreshCurrentProfile();
+ }
+ }
+
private void InitTaskbarList()
{
if (Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 1)
@@ -580,7 +616,10 @@ namespace nspector
private void btnResetValue_Click(object sender, EventArgs e)
{
- ResetSelectedValue();
+ if (Control.ModifierKeys == Keys.Control)
+ DeleteSelectedValue();
+ else
+ ResetSelectedValue();
}
private void ChangeCurrentProfile(string profileName)
@@ -1151,11 +1190,12 @@ namespace nspector
private void lvSettings_DoubleClick(object sender, EventArgs e)
{
- if (Debugger.IsAttached && 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;
- Clipboard.SetText(string.Format($"0x{settingId:X8} {settingName}"));
+ //Clipboard.SetText(string.Format($"0x{settingId:X8} {settingName}"));
+ Clipboard.SetText(string.Format($"{settingName}"));
}
}
@@ -1223,10 +1263,55 @@ namespace nspector
CopyModifiedSettingsToClipBoard();
}
+ if (e.Control && e.Alt && e.KeyCode == Keys.D)
+ {
+ EnableDevmode();
+ }
+
if (Debugger.IsAttached && e.Control && e.KeyCode == Keys.T)
{
TestStoreSettings();
}
+
+ if (e.Control && e.KeyCode == Keys.F)
+ {
+ SearchSetting();
+ }
+
+ if (e.KeyCode == Keys.Escape)
+ {
+ RefreshCurrentProfile();
+ }
+
+
+ }
+
+ private void SearchSetting()
+ {
+ string inputString = "";
+ if (InputBox.Show("Search Setting", "Please enter setting name:", ref inputString, new List(), "", 2048) == System.Windows.Forms.DialogResult.OK)
+ {
+ var lowerInput = inputString.Trim().ToLower();
+ lvSettings.BeginUpdate();
+ foreach(ListViewItem itm in lvSettings.Items)
+ {
+ if (!itm.Text.ToLower().Contains(lowerInput))
+ {
+ itm.Remove();
+ }
+ }
+ lvSettings.EndUpdate();
+ }
+
+ }
+
+ private void EnableDevmode()
+ {
+ isDevMode = true;
+ lvSettings.Font = new Font("Consolas", 9);
+ cbValues.Font = new Font("Consolas", 9);
+ lvSettings.HeaderStyle = ColumnHeaderStyle.Nonclickable;
+ RefreshCurrentProfile();
}
private void TestStoreSettings()
diff --git a/nspector/frmDrvSettings.resx b/nspector/frmDrvSettings.resx
index f209c00..0d168c9 100644
--- a/nspector/frmDrvSettings.resx
+++ b/nspector/frmDrvSettings.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADI
- DAAAAk1TRnQBSQFMAgEBBAEAAagBBwGoAQcBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
+ DAAAAk1TRnQBSQFMAgEBBAEAAcABBwHAAQcBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEYBgABGP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/ADMAAcgBvQGvAacBkQF5BgAD/iEA
A+QD2gYAA/4hAAGXAcMBqwFMAZwBcAYAA/4hAAOmA2gGAAP+FQAB8gHxAfABqQGPAXQBzwHHAbwD/wG6
AaUBjAGuAZQBeAHxAe8B7QHvAe0B6wGhAYgBbQHkAeAB2xIAA/UD3QPmA/8D4APeA/QD8wPaA+4SAAHt
@@ -195,7 +195,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAGgSURBVDhPrZPLSsNAFIb7BoKP4Upw5UoQBHfmMrG1olCa
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGgSURBVDhPrZPLSsNAFIb7BoKP4Upw5UoQBHfmMrG1olCa
pFoExY2KiHcRERFEwYUKglSQesFeQK2rFkFr0Y26MRAKpa2+QS+/MzGpaS114wdhQv7/nDknZ8bx7xDi
a+FFeYvnFU2QFHCcRxdEOcQTmTctjWHB4UgM2Wwe5XIZ+fwnko/PWF3bhiAqJzRRp2mtD0/U7oWlTbAK
Bj1jYO/vmo5SqYR44gG9fcPgiNpu2uvDkrCVEG+zIMkqcfqQuEuiWCwidhsHJ8qHhtEOLX2H9cxW81MF
@@ -208,7 +208,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAFcSURBVDhP3VFNK0RhFL4/wNbM3PdcCgsfsbHDgkJKWPgD
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFcSURBVDhP3VFNK0RhFL4/wNbM3PdcCgsfsbHDgkJKWPgD
ilJGNN73XEs/gbKUmvITuPc9d5iwYKfZyULZ26BkhTjnnXs1TWTNqafOx/M895z3ev84FsrwigQfvyGl
1yNM1IyO4cQNrUKdqGFj1awmuGgWZnDC9Wouz8U1xnATkj+oE78HLVyWKPeAlH9EUkOa1FyzWOAxeVIS
JuxtRoVeERhS51zviLlsIHNjYRltW1ejWOChDdbqhEIfRoVbE0PZbXXoP3G/ygZFNyeYZ4xlwgzC9fAI
@@ -220,7 +220,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhP3Y/PKwRhHIf3f5g/wMWUlIuDUk5y5MCB3Dk4
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhP3Y/PKwRhHIf3f5g/wMWUlIuDUk5y5MCB3Dk4
7EUbBwdXJ3EXsksjidlk2x27NrXt5kdjlTQXbSFK2iaGaX7s491Zjppx5FNP7/et9/n0fmP/PFwu8JGd
5OsaLdxpNIyVQPL1GcyDwWDmVsEx1sLLGvdHeLtduKVh/GIPTlbGPRvF3mmjXm0Vh8a9SEBGAl1gCMoS
j2p/uOyX5/AK4/i5bqgI8UrQPFUJO9mOr43gHk/9XOToy9QLCd4O+yAvxCb7gg0JK9WJqcWxTubDf+Kd
@@ -237,7 +237,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
@@ -252,7 +252,7 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
@@ -282,7 +282,4 @@
True
-
- True
-
\ No newline at end of file
diff --git a/nspector/nvidiaProfileInspector.csproj b/nspector/nvidiaProfileInspector.csproj
index b5c8b71..69334a1 100644
--- a/nspector/nvidiaProfileInspector.csproj
+++ b/nspector/nvidiaProfileInspector.csproj
@@ -93,7 +93,7 @@
bin\Release\
- TRACE
+ TRACE;RELEASE
false
none
AnyCPU
diff --git a/nvidiaProfileInspector.sln b/nvidiaProfileInspector.sln
index 0f12820..0e4c954 100644
--- a/nvidiaProfileInspector.sln
+++ b/nvidiaProfileInspector.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.23107.0
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nvidiaProfileInspector", "nspector\nvidiaProfileInspector.csproj", "{27B20027-E783-4ADC-AF16-40A49463F4BF}"
EndProject
@@ -19,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {7FB061B1-515F-4B0E-B49F-552DFCA05527}
+ EndGlobalSection
EndGlobal