mirror of
https://github.com/Orbmu2k/nvidiaProfileInspector.git
synced 2026-01-03 12:28:08 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4ce1c9018 | ||
|
|
abef5e1eb1 | ||
|
|
c2f71c5d1e | ||
|
|
a4ea01dfd1 |
@@ -260,7 +260,15 @@ namespace nspector.Common
|
||||
if (!alreadySet.Contains(setting.SettingId))
|
||||
{
|
||||
var newSetting = ImportExportUitl.ConvertProfileSettingToDrsSetting(setting);
|
||||
StoreSetting(hSession, hProfile, newSetting);
|
||||
try
|
||||
{
|
||||
StoreSetting(hSession, hProfile, newSetting);
|
||||
}
|
||||
catch (NvapiException ex)
|
||||
{
|
||||
if (ex.Status != NvAPI_Status.NVAPI_SETTING_NOT_FOUND)
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,12 +301,16 @@ namespace nspector.Common
|
||||
if (groupName == null)
|
||||
groupName = GetLegacyGroupName(settingId, settingName);
|
||||
|
||||
|
||||
|
||||
var result = new SettingMeta()
|
||||
{
|
||||
SettingType = settingType,
|
||||
SettingName = settingName,
|
||||
GroupName = groupName,
|
||||
|
||||
IsApiExposed = GetIsApiExposed(settingId),
|
||||
|
||||
DefaultDwordValue =
|
||||
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
|
||||
? GetDwordDefaultValue(settingId) : 0,
|
||||
@@ -345,6 +349,7 @@ namespace nspector.Common
|
||||
SettingName = settingMeta.SettingName,
|
||||
SettingType = settingMeta.SettingType,
|
||||
GroupName = settingMeta.GroupName,
|
||||
IsApiExposed = settingMeta.IsApiExposed,
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(newMeta.SettingName))
|
||||
@@ -403,5 +408,10 @@ namespace nspector.Common
|
||||
return "Other";
|
||||
|
||||
}
|
||||
private bool GetIsApiExposed(uint settingId)
|
||||
{
|
||||
var driverMeta = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.DriverSettings);
|
||||
return (driverMeta != null && driverMeta.Service.GetSettingIds().Contains(settingId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,6 +442,7 @@ namespace nspector.Common
|
||||
ValueText = valueText,
|
||||
State = settingState,
|
||||
IsStringValue = settingMeta.SettingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE,
|
||||
IsApiExposed = settingMeta.IsApiExposed,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace nspector.Common.Meta
|
||||
|
||||
public byte[] DefaultBinaryValue { get; set; }
|
||||
|
||||
public bool IsApiExposed { get; set; }
|
||||
|
||||
public List<SettingValue<string>> StringValues { get; set; }
|
||||
|
||||
public List<SettingValue<uint>> DwordValues { get; set; }
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
public bool IsStringValue { get; set; }
|
||||
|
||||
public bool IsApiExposed { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}; 0x{1:X8}; {2}; {3}; {4};", State, SettingId, SettingText, ValueText, ValueRaw);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -150,7 +150,11 @@ namespace nspector
|
||||
|
||||
foreach (var settingItem in _currentProfileSettingItems)
|
||||
{
|
||||
lvSettings.Items.Add(CreateListViewItem(settingItem));
|
||||
var itm = lvSettings.Items.Add(CreateListViewItem(settingItem));
|
||||
if (Debugger.IsAttached && !settingItem.IsApiExposed)
|
||||
{
|
||||
itm.ForeColor = Color.LightCoral;
|
||||
}
|
||||
}
|
||||
|
||||
btnResetValue.Enabled = false;
|
||||
|
||||
Reference in New Issue
Block a user