Compare commits

...

29 Commits

Author SHA1 Message Date
Orbmu2k
9adc3b9cb9 #38 enable wheel scrolling in toolstrip dropdownmenu & cleanups 2020-01-13 20:06:59 +01:00
Orbmu2k
57a8879a2c added ShowCustomizedSettingNamesOnly & ShowScannedUnknownSettings to user settings 2020-01-12 15:46:04 +01:00
Orbmu2k
c47e69d81c moved CFR setting to SLI group 2020-01-12 15:36:48 +01:00
Orbmu2k
21674d3f09 use hex settingnames only as fallback even if the setting source priority is higher 2020-01-12 14:59:09 +01:00
Orbmu2k
b5a13cf6fe migrated 3dvision setting names to reference.xml 2020-01-12 14:50:33 +01:00
Orbmu2k
c222cf1b06 further optimized unified scan for modified profiles 2020-01-12 14:28:59 +01:00
Orbmu2k
6d3237bfeb unified scan to a single run for better startup time #41 2020-01-12 14:20:22 +01:00
Orbmu2k
5dbb8ef721 fixed profiles counter for 3d vision settings 2020-01-12 00:36:00 +01:00
Orbmu2k
fcd9ef5346 merge 2020-01-11 13:46:18 +01:00
Orbmu2k
67bb397b6a fixed readme 2020-01-11 13:42:52 +01:00
Orbmu2k
ffff16ca83 Update README.md 2020-01-11 13:39:36 +01:00
Orbmu2k
cd8caa5702 fix #43 - delete application may not be successful 2020-01-11 13:38:06 +01:00
Orbmu2k
2d57d6b885 updated readme.md 2020-01-11 12:43:33 +01:00
Orbmu2k
84749fdf5f possible fix #27 #40 2020-01-11 01:10:00 +01:00
Orbmu2k
b651dae816 moved ansel setting to common group 2020-01-11 00:18:15 +01:00
Orbmu2k
0a27ce1c36 STRG+C will copy userdefined settings to clipboard 2020-01-11 00:10:16 +01:00
Orbmu2k
499cdde758 fixed drs db reset 2020-01-10 22:55:25 +01:00
Orbmu2k
cedcd4e2c6 fix #33 - using settings.xml in working folder if exists 2020-01-07 23:39:06 +01:00
Orbmu2k
5301c52c16 fixed "-disableScan" mode 2020-01-07 23:20:21 +01:00
Orbmu2k
bf8243adaf Updated Settings R441 2020-01-07 11:17:35 +01:00
Orbmu2k
854cc3d0ee fix #13 remember window size, fix crash on closing app while scanning 2019-03-23 16:13:08 +01:00
Orbmu2k
f1ecca7985 improved tempfile handling 2019-03-23 14:20:39 +01:00
Orbmu2k
1af9d1c4fb fixed game starter waiting until setting is stored (bit value editor) 2019-03-23 13:47:59 +01:00
Orbmu2k
2383de09ce xml constructor works again 2019-03-23 13:27:05 +01:00
Orbmu2k
210d5ea25f .NET 4.5 + async/await for setting scanner 2019-03-23 13:06:10 +01:00
Orbmu2k
0104d929e9 simplified version string in window title 2019-03-10 19:55:37 +01:00
Orbmu2k
786423f2d2 updated settings constants to R418 2019-03-07 09:29:42 +01:00
Orbmu2k
1152aeeae9 updated CustomSettingNames 2019-03-07 09:28:02 +01:00
Orbmu2k
c1a75b9a2f Release 2.3.0.0 2019-02-23 15:38:05 +01:00
57 changed files with 3855 additions and 989 deletions

View File

@@ -1 +1,11 @@
# nvidiaProfileInspector
![](/nspector/Images/n1-016.png) **NVIDIA Profile Inspector**
This tool is used for modifying game profiles inside the internal driver database of the nvidia driver.
All game profiles are provided by the nvidia driver, but you can add your own profiles for games missing in the driver database.
You also have access to hidden and undocumented settings, which are not provided by the drivers control panel.
For more information how to use this tool, you can find some very good wikis here:
* https://wiki.step-project.com/Guide:NVIDIA_Inspector
* https://www.pcgamingwiki.com/wiki/Nvidia_Profile_Inspector
![](npi_screenshot.png)

BIN
npi_screenshot.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@@ -6,7 +6,7 @@ namespace nspector.Common
internal class CachedSettingValue
{
internal CachedSettingValue() { }
internal CachedSettingValue() { }
internal CachedSettingValue(uint Value, string ProfileNames)
{

View File

@@ -6,14 +6,14 @@ namespace nspector.Common
{
internal class CachedSettings
{
internal CachedSettings() { }
internal CachedSettings() { }
internal CachedSettings(uint settingId, NVDRS_SETTING_TYPE settingType)
{
SettingId = settingId;
SettingType = settingType;
}
internal uint SettingId;
internal List<CachedSettingValue> SettingValues = new List<CachedSettingValue>();
@@ -21,7 +21,7 @@ namespace nspector.Common
internal uint ProfileCount = 0;
internal NVDRS_SETTING_TYPE SettingType = NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
internal void AddDwordValue(uint valueDword, string Profile)
{
var setting = SettingValues.FirstOrDefault(s => s.Value == valueDword);

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Xml.Serialization;
namespace nspector.Common.CustomSettings

View File

@@ -8,8 +8,6 @@ namespace nspector.Common.CustomSettings
[Serializable]
public class CustomSettingNames
{
public bool ShowCustomizedSettingNamesOnly = false;
public List<CustomSetting> Settings = new List<CustomSetting>();
public void StoreToFile(string filename)

View File

@@ -1,5 +1,4 @@
using System;
using System.Globalization;
namespace nspector.Common.CustomSettings
{

View File

@@ -1,16 +1,16 @@
using System;
using nspector.Common.Helper;
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using nspector.Native.NVAPI2;
namespace nspector.Common
{
internal class DrsDecrypterService : DrsSettingsServiceBase
{
private static readonly byte[] _InternalSettingsKey = new byte[] {
0x2f, 0x7c, 0x4f, 0x8b, 0x20, 0x24, 0x52, 0x8d, 0x26, 0x3c, 0x94, 0x77, 0xf3, 0x7c, 0x98, 0xa5,
0xfa, 0x71, 0xb6, 0x80, 0xdd, 0x35, 0x84, 0xba, 0xfd, 0xb6, 0xa6, 0x1b, 0x39, 0xc4, 0xcc, 0xb0,
@@ -31,9 +31,13 @@ namespace nspector.Common
public DrsDecrypterService(DrsSettingsMetaService metaService) : base(metaService)
{
CreateInternalSettingMap();
try
{
CreateInternalSettingMap();
}
catch { }
}
private uint GetDwordFromKey(uint offset)
{
var bytes = new byte[4];
@@ -82,7 +86,7 @@ namespace nspector.Common
}
}
}
private string FormatInternalSettingKey(string profileName, uint settingId)
{
return profileName + settingId.ToString("X8").ToLower();
@@ -97,40 +101,46 @@ namespace nspector.Common
private void CreateInternalSettingMap()
{
string tmpfile = Path.GetTempFileName();
DrsSession((hSession) =>
string tmpfile = TempFile.GetTempFileName();
try
{
SaveSettingsFileEx(hSession, tmpfile);
});
if (File.Exists(tmpfile))
{
var lines = File.ReadAllLines(tmpfile);
_InternalSettings = new HashSet<string>();
var paProfile = "Profile\\s\\\"(?<profileName>.*?)\\\"";
var rxProfile = new Regex(paProfile, RegexOptions.Compiled);
var paSetting = "ID_0x(?<sid>[0-9a-fA-F]+)\\s\\=.*?InternalSettingFlag\\=V0";
var rxSetting = new Regex(paSetting, RegexOptions.Compiled);
var currentProfileName = "";
for (int i = 0; i < lines.Length; i++)
DrsSession((hSession) =>
{
foreach (Match ms in rxProfile.Matches(lines[i]))
SaveSettingsFileEx(hSession, tmpfile);
});
if (File.Exists(tmpfile))
{
var lines = File.ReadAllLines(tmpfile);
_InternalSettings = new HashSet<string>();
var paProfile = "Profile\\s\\\"(?<profileName>.*?)\\\"";
var rxProfile = new Regex(paProfile, RegexOptions.Compiled);
var paSetting = "ID_0x(?<sid>[0-9a-fA-F]+)\\s\\=.*?InternalSettingFlag\\=V0";
var rxSetting = new Regex(paSetting, RegexOptions.Compiled);
var currentProfileName = "";
for (int i = 0; i < lines.Length; i++)
{
currentProfileName = ms.Result("${profileName}");
}
foreach (Match ms in rxSetting.Matches(lines[i]))
{
_InternalSettings.Add(currentProfileName + ms.Result("${sid}"));
foreach (Match ms in rxProfile.Matches(lines[i]))
{
currentProfileName = ms.Result("${profileName}");
}
foreach (Match ms in rxSetting.Matches(lines[i]))
{
_InternalSettings.Add(currentProfileName + ms.Result("${sid}"));
}
}
}
File.Delete(tmpfile);
}
finally
{
if (File.Exists(tmpfile))
File.Delete(tmpfile);
}
}
}
}
}

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using nspector.Common.Import;
using nspector.Native.NVAPI2;
@@ -18,8 +17,8 @@ namespace nspector.Common
private readonly DrsDecrypterService _DecrypterService;
public DrsImportService(
DrsSettingsMetaService metaService,
DrsSettingsService settingService,
DrsSettingsMetaService metaService,
DrsSettingsService settingService,
DrsScannerService scannerService,
DrsDecrypterService decrypterService)
: base(metaService)
@@ -43,7 +42,7 @@ namespace nspector.Common
{
LoadSettingsFileEx(hSession, filename);
SaveSettings(hSession);
});
}, forceNonGlobalSession: true, preventLoadSettings: true);
}
internal void ExportProfiles(List<string> profileNames, string filename, bool includePredefined)
@@ -77,7 +76,7 @@ namespace nspector.Common
{
result.Executeables.Add(app.appName);
}
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
@@ -239,7 +238,7 @@ namespace nspector.Common
var decryptedSetting = setting;
_DecrypterService.DecryptSettingIfNeeded(profileName, ref decryptedSetting);
if (isPredefined && exitsValueInImport && ImportExportUitl.AreDrsSettingEqualToProfileSetting(decryptedSetting, importSetting))
if (isPredefined && exitsValueInImport && ImportExportUitl.AreDrsSettingEqualToProfileSetting(decryptedSetting, importSetting))
{
alreadySet.Add(setting.settingId);
}

View File

@@ -1,21 +1,17 @@
using System;
using nspector.Common.Helper;
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using nspector.Common.Import;
using nspector.Native.NVAPI2;
using System.Threading.Tasks;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
using nspector.Common.Helper;
namespace nspector.Common
{
internal delegate void SettingScanDoneEvent();
internal delegate void SettingScanProgressEvent(int percent);
internal class DrsScannerService : DrsSettingsServiceBase
{
@@ -24,9 +20,6 @@ namespace nspector.Common
: base(metaService, decrpterService)
{ }
public event SettingScanDoneEvent OnModifiedProfilesScanDone;
public event SettingScanDoneEvent OnPredefinedSettingsScanDone;
public event SettingScanProgressEvent OnSettingScanProgress;
internal List<CachedSettings> CachedSettings = new List<CachedSettings>();
internal List<string> ModifiedProfiles = new List<string>();
@@ -70,7 +63,7 @@ namespace nspector.Common
checkedSettingsCount++;
AddScannedSettingToCache(profile, setting);
alreadyCheckedSettingIds.Add(setting.settingId);
return true;
return (setting.isCurrentPredefined != 1);
}
else if (setting.isCurrentPredefined != 1)
{
@@ -80,75 +73,64 @@ namespace nspector.Common
return false;
}
private void ReportProgress(int current, int max)
{
int percent = (current > 0) ? (int)Math.Round((current * 100f) / max) : 0;
if (OnSettingScanProgress != null)
OnSettingScanProgress(percent);
private int CalcPercent(int current, int max)
{
return (current > 0) ? (int)Math.Round((current * 100f) / max) : 0; ;
}
private void ScanForModifiedProfiles()
public async Task ScanProfileSettingsAsync(bool justModified, IProgress<int> progress, CancellationToken token = default(CancellationToken))
{
ModifiedProfiles = new List<string>();
UserProfiles = new HashSet<string>();
var knownPredefines = new List<uint>(_commonSettingIds);
DrsSession((hSession) =>
await Task.Run(() =>
{
IntPtr hBaseProfile = GetProfileHandle(hSession, "");
var profileHandles = EnumProfileHandles(hSession);
ModifiedProfiles = new List<string>();
UserProfiles = new HashSet<string>();
var knownPredefines = new List<uint>(_commonSettingIds);
var maxProfileCount = profileHandles.Count;
int curProfilePos = 0;
foreach (IntPtr hProfile in profileHandles)
DrsSession((hSession) =>
{
ReportProgress(curProfilePos++, maxProfileCount);
IntPtr hBaseProfile = GetProfileHandle(hSession, "");
var profileHandles = EnumProfileHandles(hSession);
var profile = GetProfileInfo(hSession, hProfile);
var maxProfileCount = profileHandles.Count;
int curProfilePos = 0;
int checkedSettingsCount = 0;
bool foundModifiedProfile = false;
if (profile.isPredefined == 0)
foreach (IntPtr hProfile in profileHandles)
{
ModifiedProfiles.Add(profile.profileName);
UserProfiles.Add(profile.profileName);
continue;
}
if (token.IsCancellationRequested) break;
if ((hBaseProfile == hProfile || profile.numOfApps > 0) && profile.numOfSettings > 0)
{
progress?.Report(CalcPercent(curProfilePos++, maxProfileCount));
var profile = GetProfileInfo(hSession, hProfile);
int checkedSettingsCount = 0;
var alreadyChecked = new List<uint>();
foreach (uint settingId in knownPredefines)
bool foundModifiedProfile = false;
if (profile.isPredefined == 0)
{
ModifiedProfiles.Add(profile.profileName);
UserProfiles.Add(profile.profileName);
foundModifiedProfile = true;
if (justModified) continue;
}
foreach (uint kpd in knownPredefines)
{
if (CheckCommonSetting(hSession, hProfile, profile,
ref checkedSettingsCount, settingId, false, ref alreadyChecked))
ref checkedSettingsCount, kpd, !justModified, ref alreadyChecked))
{
foundModifiedProfile = true;
ModifiedProfiles.Add(profile.profileName);
break;
if (!foundModifiedProfile)
{
foundModifiedProfile = true;
ModifiedProfiles.Add(profile.profileName);
if (justModified) break;
}
}
}
// the detection if only applications has changed in a profile makes the scan process very slow, we leave it out!
//if (!foundModifiedProfile && profile.numOfApps > 0)
//{
// var apps = GetProfileApplications(hSession, hProfile);
// foreach (var app in apps)
// {
// if (app.isPredefined == 0)
// {
// foundModifiedProfile = true;
// ModifiedProfiles.Add(profile.profileName);
// break;
// }
// }
//}
if (foundModifiedProfile || checkedSettingsCount >= profile.numOfSettings)
if ((foundModifiedProfile && justModified) || checkedSettingsCount >= profile.numOfSettings)
continue;
var settings = GetProfileSettings(hSession, hProfile);
@@ -157,77 +139,26 @@ namespace nspector.Common
if (knownPredefines.IndexOf(setting.settingId) < 0)
knownPredefines.Add(setting.settingId);
if (!justModified && alreadyChecked.IndexOf(setting.settingId) < 0)
AddScannedSettingToCache(profile, setting);
if (setting.isCurrentPredefined != 1)
{
ModifiedProfiles.Add(profile.profileName);
break;
if (!foundModifiedProfile)
{
foundModifiedProfile = true;
ModifiedProfiles.Add(profile.profileName);
if (justModified) break;
}
}
}
}
}
});
});
if (OnModifiedProfilesScanDone != null)
OnModifiedProfilesScanDone();
}
private void ScanForPredefinedProfileSettings()
{
var knownPredefines = new List<uint>(_commonSettingIds);
DrsSession((hSession) =>
{
var profileHandles = EnumProfileHandles(hSession);
var maxProfileCount = profileHandles.Count;
int curProfilePos = 0;
foreach (IntPtr hProfile in profileHandles)
{
ReportProgress(curProfilePos++, maxProfileCount);
var profile = GetProfileInfo(hSession, hProfile);
int checkedSettingsCount = 0;
var alreadyChecked = new List<uint>();
foreach (uint kpd in knownPredefines)
{
CheckCommonSetting(hSession, hProfile, profile,
ref checkedSettingsCount, kpd, true, ref alreadyChecked);
}
if (checkedSettingsCount >= profile.numOfSettings)
continue;
var settings = GetProfileSettings(hSession, hProfile);
foreach (var setting in settings)
{
if (knownPredefines.IndexOf(setting.settingId) < 0)
knownPredefines.Add(setting.settingId);
if (alreadyChecked.IndexOf(setting.settingId) < 0)
AddScannedSettingToCache(profile, setting);
}
}
});
if (OnPredefinedSettingsScanDone != null)
OnPredefinedSettingsScanDone();
}
public void StartScanForModifiedProfilesAsync()
{
var thread = new Thread(ScanForModifiedProfiles);
thread.Start();
}
public void StartScanForPredefinedSettingsAsync()
{
var thread = new Thread(ScanForPredefinedProfileSettings);
thread.Start();
}
private void AddScannedSettingToCache(NVDRS_PROFILE profile, NVDRS_SETTING setting)
{
// Skip 3D Vision string values here for improved scan performance
@@ -256,45 +187,53 @@ namespace nspector.Common
else if (setting.settingType == NVDRS_SETTING_TYPE.NVDRS_BINARY_TYPE)
cachedSetting.AddBinaryValue(setting.predefinedValue.binaryValue, profile.profileName);
}
else
cachedSetting.ProfileCount++;
if (!cacheEntryExists)
CachedSettings.Add(cachedSetting);
}
}
public string FindProfilesUsingApplication(string applicationName)
{
string lowerApplicationName = applicationName.ToLower();
string tmpfile = Path.GetTempFileName();
var matchingProfiles = new List<string>();
string tmpfile = TempFile.GetTempFileName();
DrsSession((hSession) =>
try
{
SaveSettingsFileEx(hSession, tmpfile);
});
var matchingProfiles = new List<string>();
if (File.Exists(tmpfile))
{
string content = File.ReadAllText(tmpfile);
string pattern = "\\sProfile\\s\\\"(?<profile>.*?)\\\"(?<scope>.*?Executable.*?)EndProfile";
foreach (Match m in Regex.Matches(content, pattern, RegexOptions.Singleline))
DrsSession((hSession) =>
{
string scope = m.Result("${scope}");
foreach (Match ms in Regex.Matches(scope, "Executable\\s\\\"(?<app>.*?)\\\"", RegexOptions.Singleline))
SaveSettingsFileEx(hSession, tmpfile);
});
if (File.Exists(tmpfile))
{
string content = File.ReadAllText(tmpfile);
string pattern = "\\sProfile\\s\\\"(?<profile>.*?)\\\"(?<scope>.*?Executable.*?)EndProfile";
foreach (Match m in Regex.Matches(content, pattern, RegexOptions.Singleline))
{
if (ms.Result("${app}").ToLower() == lowerApplicationName)
string scope = m.Result("${scope}");
foreach (Match ms in Regex.Matches(scope, "Executable\\s\\\"(?<app>.*?)\\\"", RegexOptions.Singleline))
{
matchingProfiles.Add(m.Result("${profile}"));
if (ms.Result("${app}").ToLower() == lowerApplicationName)
{
matchingProfiles.Add(m.Result("${profile}"));
}
}
}
}
return string.Join(";", matchingProfiles);
}
finally
{
if (File.Exists(tmpfile))
File.Delete(tmpfile);
}
if (File.Exists(tmpfile))
File.Delete(tmpfile);
return string.Join(";", matchingProfiles);
}
}

View File

@@ -1,15 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.IO;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using nspector.Common.CustomSettings;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common
{
internal class DrsServiceLocator
@@ -53,6 +45,6 @@ namespace nspector.Common
return null;
}
}
}

View File

@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nspector.Native.NVAPI2;
using nspector.Native.NVAPI2;
using System;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common
@@ -18,11 +14,15 @@ namespace nspector.Common
private static object _Sync = new object();
public static T DrsSession<T>(Func<IntPtr, T> action)
public static T DrsSession<T>(Func<IntPtr, T> action, bool forceNonGlobalSession = false, bool preventLoadSettings = false)
{
lock (_Sync)
{
if (HoldSession && (GlobalSession == IntPtr.Zero))
if (!HoldSession || forceNonGlobalSession)
return NonGlobalDrsSession<T>(action, preventLoadSettings);
if (GlobalSession == IntPtr.Zero)
{
#pragma warning disable CS0420
@@ -32,18 +32,21 @@ namespace nspector.Common
if (csRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_CreateSession", csRes);
var nvRes = nvw.DRS_LoadSettings(GlobalSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettings", nvRes);
if (!preventLoadSettings)
{
var nvRes = nvw.DRS_LoadSettings(GlobalSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettings", nvRes);
}
}
}
if (HoldSession && GlobalSession != IntPtr.Zero)
if (GlobalSession != IntPtr.Zero)
{
return action(GlobalSession);
}
return NonGlobalDrsSession<T>(action);
throw new Exception(nameof(GlobalSession) + " is Zero!");
}
public static void DestroyGlobalSession()
@@ -58,7 +61,7 @@ namespace nspector.Common
}
}
private static T NonGlobalDrsSession<T>(Func<IntPtr, T> action)
private static T NonGlobalDrsSession<T>(Func<IntPtr, T> action, bool preventLoadSettings = false)
{
IntPtr hSession = IntPtr.Zero;
var csRes = nvw.DRS_CreateSession(ref hSession);
@@ -67,9 +70,12 @@ namespace nspector.Common
try
{
var nvRes = nvw.DRS_LoadSettings(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettings", nvRes);
if (!preventLoadSettings)
{
var nvRes = nvw.DRS_LoadSettings(hSession);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_LoadSettings", nvRes);
}
return action(hSession);
}
@@ -82,6 +88,6 @@ namespace nspector.Common
}
}
}

View File

@@ -1,24 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using nspector.Common.Meta;
using nspector.Common.CustomSettings;
using nspector.Native.NVAPI2;
using nspector.Native.NvApi.DriverSettings;
namespace nspector.Common
{
internal class DrsSettingsMetaService
{
private ISettingMetaService ConstantMeta;
private ISettingMetaService CustomMeta;
public ISettingMetaService DriverMeta;
private ISettingMetaService ScannedMeta;
private ISettingMetaService ReferenceMeta;
private ISettingMetaService NvD3dUmxMeta;
private readonly CustomSettingNames _customSettings;
private readonly CustomSettingNames _referenceSettings;
@@ -39,7 +35,7 @@ namespace nspector.Common
{
settingMetaCache = new Dictionary<uint, SettingMeta>();
MetaServices = new List<MetaServiceItem>();
CustomMeta = new CustomSettingMetaService(_customSettings);
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 1, Service = CustomMeta });
@@ -62,13 +58,10 @@ namespace nspector.Common
ReferenceMeta = new CustomSettingMetaService(_referenceSettings, SettingMetaSource.ReferenceSettings);
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 4, Service = ReferenceMeta });
}
NvD3dUmxMeta = new NvD3dUmxSettingMetaService();
MetaServices.Add(new MetaServiceItem() { ValueNamePrio = 6, Service = NvD3dUmxMeta });
}
}
private NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
@@ -80,16 +73,26 @@ namespace nspector.Common
return NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE;
}
private string GetSettingName(uint settingId)
{
foreach (var service in MetaServices.OrderBy(x=>x.Service.Source))
string hexCandidate = null;
foreach (var service in MetaServices.OrderBy(x => x.Service.Source))
{
var settingName = service.Service.GetSettingName(settingId);
if (settingName != null)
if (!string.IsNullOrEmpty(settingName))
{
if (settingName.StartsWith("0x"))
{
hexCandidate = settingName;
continue;
}
return settingName;
}
}
return null;
return hexCandidate;
}
private string GetGroupName(uint settingId)
@@ -123,7 +126,7 @@ namespace nspector.Common
if (settingDefault != null)
return settingDefault;
}
return null;
}
@@ -153,7 +156,7 @@ namespace nspector.Common
else
{
var currentNonScannedValues = a.Where(xa => xa.ValueSource != SettingMetaSource.ScannedSettings).Select(xa => xa.Value).ToList();
var newNonScannedValues = b.Where(xb => !currentNonScannedValues.Contains(xb.Value)).ToList();
a.AddRange(newNonScannedValues);
@@ -171,7 +174,7 @@ namespace nspector.Common
var atmp = a.FirstOrDefault();
if (atmp != null && atmp is IComparable)
return a.OrderBy(x=>x.Value).ToList();
return a.OrderBy(x => x.Value).ToList();
else
return a.ToList();
}
@@ -196,7 +199,7 @@ namespace nspector.Common
{
result = MergeSettingValues(result, service.Service.GetStringValues(settingId));
}
return result;
}
@@ -211,15 +214,15 @@ namespace nspector.Common
if (result != null)
{
result = (from v in result.Where(x=> 1==1
result = (from v in result.Where(x => 1 == 1
&& !x.ValueName.EndsWith("_NUM")
&& !x.ValueName.EndsWith("_MASK")
&& (!x.ValueName.EndsWith("_MIN") || x.ValueName.Equals("PREFERRED_PSTATE_PREFER_MIN"))
&& (!x.ValueName.EndsWith("_MAX") || x.ValueName.Equals("PREFERRED_PSTATE_PREFER_MAX"))
)
group v by v.ValueName into g
select g.First(t => t.ValueName == g.Key))
)
group v by v.ValueName into g
select g.First(t => t.ValueName == g.Key))
.OrderBy(v => v.ValueSource)
.ThenBy(v => v.ValuePos)
.ThenBy(v => v.ValueName).ToList();
@@ -228,7 +231,7 @@ namespace nspector.Common
return result;
}
public List<uint> GetSettingIds(SettingViewMode viewMode)
{
var settingIds = new List<uint>();
@@ -249,22 +252,21 @@ namespace nspector.Common
switch (viewMode)
{
case SettingViewMode.CustomSettingsOnly:
return new [] {
SettingMetaSource.CustomSettings
return new[] {
SettingMetaSource.CustomSettings
};
case SettingViewMode.IncludeScannedSetttings:
return new [] {
return new[] {
SettingMetaSource.ConstantSettings,
SettingMetaSource.ScannedSettings,
SettingMetaSource.CustomSettings,
SettingMetaSource.ScannedSettings,
SettingMetaSource.CustomSettings,
SettingMetaSource.DriverSettings,
SettingMetaSource.NvD3dUmxSettings,
SettingMetaSource.ReferenceSettings,
};
default:
return new [] {
SettingMetaSource.CustomSettings,
SettingMetaSource.DriverSettings,
return new[] {
SettingMetaSource.CustomSettings,
SettingMetaSource.DriverSettings,
};
}
}
@@ -284,7 +286,6 @@ namespace nspector.Common
SettingMetaSource.ScannedSettings,
SettingMetaSource.CustomSettings,
SettingMetaSource.DriverSettings,
SettingMetaSource.NvD3dUmxSettings,
SettingMetaSource.ReferenceSettings,
};
@@ -296,7 +297,7 @@ namespace nspector.Common
var settingType = GetSettingValueType(settingId);
var settingName = GetSettingName(settingId);
var groupName = GetGroupName(settingId);
if (groupName == null)
groupName = GetLegacyGroupName(settingId, settingName);
@@ -306,11 +307,11 @@ namespace nspector.Common
SettingName = settingName,
GroupName = groupName,
DefaultDwordValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
DefaultDwordValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
? GetDwordDefaultValue(settingId) : 0,
DefaultStringValue =
DefaultStringValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE
? GetStringDefaultValue(settingId) : null,

View File

@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using nspector.Common.Helper;
using nspector.Common.Meta;
using nspector.Native.NVAPI2;
@@ -38,6 +35,22 @@ namespace nspector.Common
private string GetDrsProgramPath()
{
var nvidiaInstallerFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"NVIDIA Corporation\Installer2");
var driverFolders = Directory.EnumerateDirectories(nvidiaInstallerFolder, "Display.Driver.*");
foreach (var folder in driverFolders)
{
var fiDbInstaller = new FileInfo(Path.Combine(folder, "dbInstaller.exe"));
if (!fiDbInstaller.Exists) continue;
var fviDbInstaller = FileVersionInfo.GetVersionInfo(fiDbInstaller.FullName);
var fileversion = fviDbInstaller.FileVersion.Replace(".", "");
var driverver = DriverVersion.ToString().Replace(",", "").Replace(".", "");
if (fileversion.EndsWith(driverver))
return fiDbInstaller.DirectoryName;
}
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
@"NVIDIA Corporation\Drs");
}
@@ -59,45 +72,56 @@ namespace nspector.Common
public void DeleteAllProfilesHard()
{
var tmpFile = Path.GetTempFileName();
File.WriteAllText(tmpFile, "BaseProfile \"Base Profile\"\r\nProfile \"Base Profile\"\r\nShowOn All\r\nProfileType Global\r\nEndProfile\r\n");
DrsSession((hSession) =>
var tmpFile = TempFile.GetTempFileName();
try
{
LoadSettingsFileEx(hSession, tmpFile);
SaveSettings(hSession);
});
File.WriteAllText(tmpFile, "BaseProfile \"Base Profile\"\r\nSelectedGlobalProfile \"Base Profile\"\r\nProfile \"Base Profile\"\r\nShowOn All\r\nProfileType Global\r\nEndProfile\r\n");
if (File.Exists(tmpFile))
File.Delete(tmpFile);
DrsSession((hSession) =>
{
LoadSettingsFileEx(hSession, tmpFile);
SaveSettings(hSession);
}, forceNonGlobalSession: true, preventLoadSettings: true);
}
finally
{
if (File.Exists(tmpFile))
File.Delete(tmpFile);
}
}
public void DeleteProfileHard(string profileName)
{
var tmpFileName = Path.GetTempFileName();
var tmpFileContent = "";
var tmpFileName = TempFile.GetTempFileName();
DrsSession((hSession) =>
try
{
SaveSettingsFileEx(hSession, tmpFileName);
tmpFileContent = File.ReadAllText(tmpFileName);
string pattern = "(?<rpl>\nProfile\\s\"" + Regex.Escape(profileName) + "\".*?EndProfile.*?\n)";
tmpFileContent = Regex.Replace(tmpFileContent, pattern, "", RegexOptions.Singleline);
File.WriteAllText(tmpFileName, tmpFileContent);
});
var tmpFileContent = "";
if (tmpFileContent != "")
{
DrsSession((hSession) =>
{
LoadSettingsFileEx(hSession, tmpFileName);
SaveSettings(hSession);
SaveSettingsFileEx(hSession, tmpFileName);
tmpFileContent = File.ReadAllText(tmpFileName);
string pattern = "(?<rpl>\nProfile\\s\"" + Regex.Escape(profileName) + "\".*?EndProfile.*?\n)";
tmpFileContent = Regex.Replace(tmpFileContent, pattern, "", RegexOptions.Singleline);
File.WriteAllText(tmpFileName, tmpFileContent);
});
}
if (File.Exists(tmpFileName))
File.Delete(tmpFileName);
if (tmpFileContent != "")
{
DrsSession((hSession) =>
{
LoadSettingsFileEx(hSession, tmpFileName);
SaveSettings(hSession);
});
}
}
finally
{
if (File.Exists(tmpFileName))
File.Delete(tmpFileName);
}
}
public void DeleteProfile(string profileName)
@@ -110,13 +134,13 @@ namespace nspector.Common
var nvRes = nvw.DRS_DeleteProfile(hSession, hProfile);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_DeleteProfile", nvRes);
SaveSettings(hSession);
}
});
}
public List<string> GetProfileNames(ref string baseProfileName)
{
var lstResult = new List<string>();
@@ -127,7 +151,7 @@ namespace nspector.Common
var hBase = GetProfileHandle(hSession, null);
var baseProfile = GetProfileInfo(hSession, hBase);
tmpBaseProfileName = baseProfile.profileName;
lstResult.Add("_GLOBAL_DRIVER_PROFILE (" + tmpBaseProfileName + ")");
var profileHandles = EnumProfileHandles(hSession);
@@ -151,7 +175,7 @@ namespace nspector.Common
DrsSession((hSession) =>
{
var hProfile = CreateProfile(hSession, profileName);
if (applicationName != null)
AddApplication(hSession, hProfile, applicationName);
@@ -228,7 +252,7 @@ namespace nspector.Common
var nvRes = nvw.DRS_RestoreProfileDefaultSetting(hSession, hProfile, settingId);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_RestoreProfileDefaultSetting", nvRes);
SaveSettings(hSession);
var modifyCount = 0;
@@ -248,14 +272,14 @@ namespace nspector.Common
removeFromModified = tmpRemoveFromModified;
}
public uint GetDwordValueFromProfile(string profileName, uint settingId, bool returnDefaultValue = false)
public uint GetDwordValueFromProfile(string profileName, uint settingId, bool returnDefaultValue = false, bool forceDedicatedScope = false)
{
return DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var dwordValue = ReadDwordValue(hSession, hProfile, settingId);
if (dwordValue != null)
return dwordValue.Value;
else if (returnDefaultValue)
@@ -275,7 +299,7 @@ namespace nspector.Common
});
}
public int StoreSettingsToProfile(string profileName, List<KeyValuePair<uint,string>> settings)
public int StoreSettingsToProfile(string profileName, List<KeyValuePair<uint, string>> settings)
{
DrsSession((hSession) =>
{
@@ -308,7 +332,7 @@ namespace nspector.Common
return 0;
}
private SettingItem CreateSettingItem(NVDRS_SETTING setting, bool useDefault = false)
{
@@ -420,9 +444,9 @@ namespace nspector.Common
IsStringValue = settingMeta.SettingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE,
};
}
public List<SettingItem> GetSettingsForProfile(string profileName, SettingViewMode viewMode, ref List<string> applications)
public List<SettingItem> GetSettingsForProfile(string profileName, SettingViewMode viewMode, ref Dictionary<string, string> applications)
{
var result = new List<SettingItem>();
var settingIds = meta.GetSettingIds(viewMode);
@@ -432,7 +456,7 @@ namespace nspector.Common
applications = DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var profileSettings = GetProfileSettings(hSession, hProfile);
foreach (var profileSetting in profileSettings)
{
@@ -455,11 +479,11 @@ namespace nspector.Common
}
return GetProfileApplications(hSession, hProfile)
.Select(x => x.appName).ToList(); ;
.Select(x => Tuple.Create(x.appName, GetApplicationFingerprint(x))).ToDictionary(x => x.Item2, x => x.Item1);
});
return result.OrderBy(x=>x.SettingText).ThenBy(x=>x.GroupName).ToList();
return result.OrderBy(x => x.SettingText).ThenBy(x => x.GroupName).ToList();
}
public void AddApplication(string profileName, string applicationName)
@@ -472,26 +496,27 @@ namespace nspector.Common
});
}
public void DeleteApplication(string profileName, string applicationName)
public void RemoveApplication(string profileName, string applicationFingerprint)
{
DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
DeleteApplication(hSession, hProfile, applicationName);
var applications = GetProfileApplications(hSession, hProfile);
foreach (var app in applications)
{
if (GetApplicationFingerprint(app) != applicationFingerprint) continue;
DeleteApplication(hSession, hProfile, app);
break;
}
SaveSettings(hSession);
});
}
public List<string> GetApplications(string profileName)
private string GetApplicationFingerprint(NVDRS_APPLICATION_V3 application)
{
return DrsSession((hSession) =>
{
var hProfile = GetProfileHandle(hSession, profileName);
var applications = GetProfileApplications(hSession, hProfile);
return applications.Select(x => x.appName).ToList();
});
return $"{application.appName}|{application.fileInFolder}|{application.userFriendlyName}|{application.launcher}";
}
}
}

View File

@@ -41,18 +41,18 @@ namespace nspector.Common
return result;
}
protected void DrsSession(Action<IntPtr> action)
protected void DrsSession(Action<IntPtr> action, bool forceNonGlobalSession = false, bool preventLoadSettings = false)
{
DrsSessionScope.DrsSession<bool>((hSession) =>
{
action(hSession);
return true;
});
}, forceNonGlobalSession: forceNonGlobalSession, preventLoadSettings: preventLoadSettings);
}
protected T DrsSession<T>(Func<IntPtr, T> action)
protected T DrsSession<T>(Func<IntPtr, T> action, bool forceDedicatedScope = false)
{
return DrsSessionScope.DrsSession<T>(action);
return DrsSessionScope.DrsSession<T>(action, forceDedicatedScope);
}
protected IntPtr GetProfileHandle(IntPtr hSession, string profileName)
@@ -227,9 +227,9 @@ namespace nspector.Common
}
protected void DeleteApplication(IntPtr hSession, IntPtr hProfile, string applicationName)
protected void DeleteApplication(IntPtr hSession, IntPtr hProfile, NVDRS_APPLICATION_V3 application)
{
var caRes = nvw.DRS_DeleteApplication(hSession, hProfile, new StringBuilder(applicationName));
var caRes = nvw.DRS_DeleteApplicationEx(hSession, hProfile, ref application);
if (caRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_DeleteApplication", caRes);
}
@@ -262,7 +262,7 @@ namespace nspector.Common
protected List<NVDRS_SETTING> GetProfileSettings(IntPtr hSession, IntPtr hProfile)
{
uint settingCount = 512;
var settings = new NVDRS_SETTING[512];
var settings = new NVDRS_SETTING[settingCount];
settings[0].version = NvapiDrsWrapper.NVDRS_SETTING_VER;
var esRes = NvapiDrsWrapper.DRS_EnumSettings(hSession, hProfile, 0, ref settingCount, ref settings);

View File

@@ -1,16 +1,14 @@
using nspector.Common.Meta;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
namespace nspector.Common
{
public static class DrsUtil
{
public static string StringValueRaw = "Text";
public static string GetDwordString(uint dword)
{
return string.Format("0x{0:X8}", dword);
@@ -50,7 +48,7 @@ namespace nspector.Common
var settingValue = meta.DwordValues
.FirstOrDefault(x => x.Value.Equals(dwordValue));
return settingValue == null ? GetDwordString(dwordValue): settingValue.ValueName;
return settingValue == null ? GetDwordString(dwordValue) : settingValue.ValueName;
}
internal static string ParseStringSettingValue(SettingMeta meta, string text)

View File

@@ -9,9 +9,9 @@ namespace nspector.Common.Helper
{
var identity = WindowsIdentity.GetCurrent();
var principal = new WindowsPrincipal(identity);
isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);
isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);
}
public static bool IsAdmin
{
get { return isAdmin; }

View File

@@ -0,0 +1,82 @@
using System;
using System.Windows.Forms;
namespace nspector.Common.Helper
{
//by Bryce Wagner https://stackoverflow.com/questions/13139074/mouse-wheel-scrolling-toolstrip-menu-items
public class DropDownMenuScrollWheelHandler : IMessageFilter
{
private static DropDownMenuScrollWheelHandler Instance;
public static void Enable(bool enabled)
{
if (enabled)
{
if (Instance == null)
{
Instance = new DropDownMenuScrollWheelHandler();
Application.AddMessageFilter(Instance);
}
}
else
{
if (Instance != null)
{
Application.RemoveMessageFilter(Instance);
Instance = null;
}
}
}
private IntPtr activeHwnd;
private ToolStripDropDown activeMenu;
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == 0x200 && activeHwnd != m.HWnd) // WM_MOUSEMOVE
{
activeHwnd = m.HWnd;
this.activeMenu = Control.FromHandle(m.HWnd) as ToolStripDropDown;
}
else if (m.Msg == 0x20A && this.activeMenu != null) // WM_MOUSEWHEEL
{
int delta = (short)(ushort)(((uint)(ulong)m.WParam) >> 16);
HandleDelta(this.activeMenu, delta);
return true;
}
return false;
}
private static readonly Action<ToolStrip, int> ScrollInternal
= (Action<ToolStrip, int>)Delegate.CreateDelegate(typeof(Action<ToolStrip, int>),
typeof(ToolStrip).GetMethod("ScrollInternal",
System.Reflection.BindingFlags.NonPublic
| System.Reflection.BindingFlags.Instance));
private void HandleDelta(ToolStripDropDown ts, int delta)
{
if (ts.Items.Count == 0)
return;
var firstItem = ts.Items[0];
var lastItem = ts.Items[ts.Items.Count - 1];
if (lastItem.Bounds.Bottom < ts.Height && firstItem.Bounds.Top > 0)
return;
delta = delta / -4;
if (delta < 0 && firstItem.Bounds.Top - delta > 9)
{
delta = firstItem.Bounds.Top - 9;
}
else if (delta > 0 && delta > lastItem.Bounds.Bottom - ts.Height + 9)
{
delta = lastItem.Bounds.Bottom - ts.Height + 9;
}
if (delta != 0)
ScrollInternal(ts, delta);
}
}
}

View File

@@ -17,7 +17,7 @@ namespace nspector.Common.Helper
var buttonCancel = new Button();
var imageBox = new PictureBox();
EventHandler textchanged = delegate(object sender, EventArgs e)
EventHandler textchanged = delegate (object sender, EventArgs e)
{
bool mandatory_success = Regex.IsMatch(textBox.Text, mandatoryFormatRegExPattern);

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Windows.Forms;
namespace nspector.Common.Helper

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.IO;
using nspector.Native.WINAPI;
namespace nspector.Common.Helper

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Win32;
@@ -36,7 +35,7 @@ namespace nspector.Common.Helper
if (steamPath != null)
return Path.Combine(steamPath, @"appcache\appinfo.vdf");
}
return "";
}
@@ -90,7 +89,7 @@ namespace nspector.Common.Helper
var bid = BitConverter.GetBytes(appid);
int offset = 0;
var appidPattern = new byte[] { 0x08, bid[0], bid[1], bid[2], bid[3] };
var launchPattern = new byte[] { 0x00, 0x6C, 0x61, 0x75, 0x6E, 0x63, 0x68, 0x00 };
@@ -157,7 +156,7 @@ namespace nspector.Common.Helper
}
}
}
private static int FindOffset(byte[] bytes, byte[] pattern, int offset = 0, byte? wildcard = null)
{
for (int i = offset; i < bytes.Length; i++)

View File

@@ -0,0 +1,24 @@
using System;
using System.IO;
namespace nspector.Common.Helper
{
internal static class TempFile
{
public static string GetTempFileName()
{
while (true)
{
var tempFile = GenerateTempFileName();
if (!File.Exists(tempFile))
return tempFile;
}
}
private static string GenerateTempFileName()
{
return Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString().Replace("-", ""));
}
}
}

View File

@@ -0,0 +1,47 @@
using System;
using System.IO;
using System.Text;
using System.Windows.Forms;
namespace nspector.Common.Helper
{
public class UserSettings
{
public int WindowTop { get; set; }
public int WindowLeft { get; set; }
public int WindowWidth { get; set; }
public int WindowHeight { get; set; }
public FormWindowState WindowState { get; set; }
public bool ShowCustomizedSettingNamesOnly { get; set; } = false;
public bool ShowScannedUnknownSettings { get; set; } = false;
private static string GetSettingsFilename()
{
var fiPortalbleSettings = new FileInfo("settings.xml");
if (fiPortalbleSettings.Exists) return fiPortalbleSettings.FullName;
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName);
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
return Path.Combine(path, "settings.xml"); ;
}
public void SaveSettings()
{
XMLHelper<UserSettings>.SerializeToXmlFile(this, GetSettingsFilename(), Encoding.Unicode, true);
}
public static UserSettings LoadSettings()
{
var filename = GetSettingsFilename();
if (!File.Exists(filename)) return new UserSettings();
return XMLHelper<UserSettings>.DeserializeFromXMLFile(GetSettingsFilename());
}
}
}

View File

@@ -11,9 +11,7 @@ namespace nspector.Common.Helper
static XMLHelper()
{
//TODO: Fix It!
//xmlSerializer = new XmlSerializer(typeof(T));
xmlSerializer = XmlSerializer.FromTypes(new[]{typeof(T)})[0];
xmlSerializer = new XmlSerializer(typeof(T));
}
internal static string SerializeToXmlString(T xmlObject, Encoding encoding, bool removeNamespace)

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nspector.Native.NVAPI2;
namespace nspector.Common.Import

View File

@@ -10,7 +10,7 @@ namespace nspector.Common.Import
[XmlElement(ElementName = "SettingID")]
public uint SettingId = 0;
public string SettingValue = "0";
public SettingValueType ValueType = SettingValueType.Dword;

View File

@@ -1,6 +1,6 @@
namespace nspector.Common.Import
{
public enum SettingValueType: int
public enum SettingValueType : int
{
Dword,
AnsiString,

View File

@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using nspector.Native.NvApi.DriverSettings;
using nspector.Native.NVAPI2;
@@ -19,7 +18,7 @@ namespace nspector.Common.Meta
private readonly Dictionary<ESetting, Type> settingEnumTypeCache;
private string[] ignoreSettingNames = new[] { "TOTAL_DWORD_SETTING_NUM", "TOTAL_WSTRING_SETTING_NUM",
private string[] ignoreSettingNames = new[] { "TOTAL_DWORD_SETTING_NUM", "TOTAL_WSTRING_SETTING_NUM",
"TOTAL_SETTING_NUM", "INVALID_SETTING_ID" };
private Dictionary<ESetting, Type> CreateSettingEnumTypeCache()

View File

@@ -1,9 +1,7 @@
using nspector.Common.CustomSettings;
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{
@@ -74,11 +72,11 @@ namespace nspector.Common.Meta
return null;
}
public List<uint> GetSettingIds()
{
return customSettings.Settings
.Select(x => x.SettingId).ToList();
return customSettings.Settings
.Select(x => x.SettingId).ToList();
}

View File

@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using System.Text;
using nspector.Common.CustomSettings;
using nspector.Native.NvApi.DriverSettings;
using nspector.Native.NVAPI2;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
namespace nspector.Common.Meta
{
@@ -26,14 +20,14 @@ namespace nspector.Common.Meta
private List<uint> InitSettingIds()
{
var settingIds = new List<uint>();
var nvRes = nvw.DRS_EnumAvailableSettingIds(out settingIds, 512);
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_EnumAvailableSettingIds", nvRes);
return settingIds;
}
private SettingMeta GetDriverSettingMetaInternal(uint settingId)
{
var values = new NVDRS_SETTING_VALUES();
@@ -44,10 +38,10 @@ namespace nspector.Common.Meta
if (nvRes == NvAPI_Status.NVAPI_SETTING_NOT_FOUND)
return null;
if (nvRes != NvAPI_Status.NVAPI_OK)
throw new NvapiException("DRS_EnumAvailableSettingValues", nvRes);
var sbSettingName = new StringBuilder((int)NvapiDrsWrapper.NVAPI_UNICODE_STRING_MAX);
nvRes = nvw.DRS_GetSettingNameFromId(settingId, sbSettingName);
@@ -58,11 +52,12 @@ namespace nspector.Common.Meta
if (string.IsNullOrWhiteSpace(settingName))
settingName = DrsUtil.GetDwordString(settingId);
var result = new SettingMeta {
var result = new SettingMeta
{
SettingType = values.settingType,
SettingName = settingName,
};
if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE)
{
@@ -71,13 +66,14 @@ namespace nspector.Common.Meta
for (int i = 0; i < values.numSettingValues; i++)
{
result.DwordValues.Add(
new SettingValue<uint> (Source) {
new SettingValue<uint>(Source)
{
Value = values.settingValues[i].dwordValue,
ValueName = DrsUtil.GetDwordString(values.settingValues[i].dwordValue),
});
}
}
if (values.settingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE)
{
result.DefaultStringValue = values.defaultValue.stringValue;
@@ -116,7 +112,7 @@ namespace nspector.Common.Meta
}
}
return result;
}
private SettingMeta GetSettingsMeta(uint settingId)
@@ -135,13 +131,13 @@ namespace nspector.Common.Meta
return null;
}
}
public string GetSettingName(uint settingId)
{
var settingMeta = GetSettingsMeta(settingId);
if (settingMeta != null)
return settingMeta.SettingName;
return null;
}
@@ -180,7 +176,7 @@ namespace nspector.Common.Meta
return null;
}
public List<uint> GetSettingIds()
{
return _settingIds;
@@ -194,7 +190,7 @@ namespace nspector.Common.Meta
return null;
}
public string GetGroupName(uint settingId)
{
return null;

View File

@@ -8,7 +8,7 @@ namespace nspector.Common.Meta
{
internal interface ISettingMetaService
{
SettingMetaSource Source {get; }
SettingMetaSource Source { get; }
NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId);

View File

@@ -1,207 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using nspector.Native.NvApi.DriverSettings;
using nspector.Native.NVAPI2;
namespace nspector.Common.Meta
{
internal class NvD3dUmxSettingMetaService : ISettingMetaService
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
struct NvD3dUmxName
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string settingName;
public uint settingId;
public uint unknown;
}
[StructLayout(LayoutKind.Sequential)]
struct NvD3dUmxNameList
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 255)]
public NvD3dUmxName[] settingNames;
}
private static int FindOffset(byte[] bytes, byte[] pattern, int offset = 0, byte? wildcard = null)
{
for (int i = offset; i < bytes.Length; i++)
{
if (pattern[0] == bytes[i] && bytes.Length - i >= pattern.Length)
{
bool ismatch = true;
for (int j = 1; j < pattern.Length && ismatch == true; j++)
{
if (bytes[i + j] != pattern[j] && ((wildcard.HasValue && wildcard != pattern[j]) || !wildcard.HasValue))
{
ismatch = false;
break;
}
}
if (ismatch)
return i;
}
}
return -1;
}
private static List<NvD3dUmxName> ParseNvD3dUmxNames(string filename)
{
if (!File.Exists(filename)) return null;
var bytes = File.ReadAllBytes(filename);
var runtimeNameOffset = FindOffset(bytes, new byte[] { 0x52, 0x75, 0x6E, 0x54, 0x69, 0x6D, 0x65, 0x4E, 0x61, 0x6D, 0x65 });
if (runtimeNameOffset > -1)
{
var _2ddNotesOffset = FindOffset(bytes, new byte[] { 0x32, 0x44, 0x44, 0x5F, 0x4E, 0x6F, 0x74, 0x65, 0x73 });
if (_2ddNotesOffset > -1)
{
var itemSize = Marshal.SizeOf(typeof(NvD3dUmxName));
var startOffset = runtimeNameOffset - itemSize;
var endOffset = _2ddNotesOffset + itemSize;
var tableLength = endOffset - startOffset;
var bufferSize = Marshal.SizeOf(typeof(NvD3dUmxNameList));
if (tableLength > bufferSize)
{
tableLength = bufferSize;
}
var itemCount = tableLength / itemSize;
var buffer = new byte[bufferSize];
Buffer.BlockCopy(bytes, startOffset, buffer, 0, tableLength);
var poBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned);
try
{
var nvD3dUmxNames = (NvD3dUmxNameList)Marshal.PtrToStructure(
poBuffer.AddrOfPinnedObject(),
typeof(NvD3dUmxNameList));
var result = new List<NvD3dUmxName>();
for (int i = 0; i < itemCount; i++)
{
result.Add(nvD3dUmxNames.settingNames[i]);
}
return result;
}
finally
{
poBuffer.Free();
}
}
}
return null;
}
private readonly List<NvD3dUmxName> _SettingNames;
private void ExportSettingsToCsn()
{
var settings = _SettingNames.Select(s => new CustomSettings.CustomSetting()
{
GroupName = "7 - Stereo",
HexSettingId = $"0x{s.settingId.ToString("X8")}",
UserfriendlyName = s.settingName,
}).ToList();
var xml = new CustomSettings.CustomSettingNames();
xml.Settings.AddRange(settings);
xml.StoreToFile("NvD3dUmx.xml");
}
public NvD3dUmxSettingMetaService()
{
var systemPath = Environment.GetFolderPath(Environment.SpecialFolder.System);
var nvD3dUmxPath = Path.Combine(systemPath, "nvd3dumx.dll");
_SettingNames = ParseNvD3dUmxNames(nvD3dUmxPath);
//ExportSettingsToCsn();
}
public Type GetSettingEnumType(uint settingId)
{
return null;
}
public NVDRS_SETTING_TYPE? GetSettingValueType(uint settingId)
{
return null;
}
public string GetSettingName(uint settingId)
{
if (_SettingNames != null)
{
var setting = _SettingNames.FirstOrDefault(s => s.settingId == settingId);
return setting.settingId != 0 ? setting.settingName : null;
}
return null;
}
public uint? GetDwordDefaultValue(uint settingId)
{
return null;
}
public string GetStringDefaultValue(uint settingId)
{
return null;
}
public List<SettingValue<string>> GetStringValues(uint settingId)
{
return null;
}
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
return null;
}
public List<uint> GetSettingIds()
{
if (_SettingNames != null)
{
return _SettingNames.Select(s => s.settingId).ToList();
}
return new List<uint>();
}
public string GetGroupName(uint settingId)
{
if (_SettingNames != null)
{
var setting = _SettingNames.FirstOrDefault(s => s.settingId == settingId);
return setting.settingId != 0 ? "7 - Stereo" : null;
}
return null;
}
public byte[] GetBinaryDefaultValue(uint settingId)
{
return null;
}
public List<SettingValue<byte[]>> GetBinaryValues(uint settingId)
{
return null;
}
public SettingMetaSource Source
{
get { return SettingMetaSource.NvD3dUmxSettings; }
}
}
}

View File

@@ -31,7 +31,7 @@ namespace nspector.Common.Meta
public string GetSettingName(uint settingId)
{
var cached = CachedSettings.FirstOrDefault(x=>x.SettingId.Equals(settingId));
var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (cached != null)
return string.Format("0x{0:X8} ({1} Profiles)", settingId, cached.ProfileCount);
@@ -69,7 +69,7 @@ namespace nspector.Common.Meta
public List<SettingValue<uint>> GetDwordValues(uint settingId)
{
var cached = CachedSettings.FirstOrDefault(x=>x.SettingId.Equals(settingId));
var cached = CachedSettings.FirstOrDefault(x => x.SettingId.Equals(settingId));
if (cached != null)
return cached.SettingValues.Select(s => new SettingValue<uint>(Source)
{

View File

@@ -1,8 +1,5 @@
using nspector.Native.NVAPI2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
namespace nspector.Common.Meta
{
public enum SettingMetaSource
{
@@ -11,7 +6,6 @@ namespace nspector.Common.Meta
DriverSettings = 20,
ConstantSettings = 30,
ReferenceSettings = 40,
NvD3dUmxSettings = 50,
ScannedSettings = 60,
ScannedSettings = 50,
}
}

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common.Meta
namespace nspector.Common.Meta
{
internal class SettingValue<T>
{
@@ -14,7 +9,7 @@ namespace nspector.Common.Meta
{
ValueSource = source;
}
public int ValuePos { get; set; }
public string ValueName { get; set; }
public T Value { get; set; }
@@ -26,6 +21,6 @@ namespace nspector.Common.Meta
return string.Format("Value={0}; ValueName={1};", Value, ValueName);
}
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nspector.Native.NVAPI2;
namespace nspector.Common

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common
namespace nspector.Common
{
internal enum SettingState
@@ -17,7 +12,7 @@ namespace nspector.Common
internal class SettingItem
{
public uint SettingId { get; set; }
public string SettingText { get; set; }
public string ValueText { get; set; }

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nspector.Common
namespace nspector.Common
{
public enum SettingViewMode
{

View File

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,7 @@
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,
@@ -34,11 +35,13 @@
ANSEL_WHITELISTED_ID = 0x1085DA8A,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ID = 0x104554B6,
APPLICATION_STEAM_ID_ID = 0x107CDDBC,
BATTERY_BOOST_ID = 0x10115C89,
AUTOFL_ID = 0x10834FFE,
BATTERY_BOOST_APP_FPS_ID = 0x10115C8C,
CPL_HIDDEN_PROFILE_ID = 0x106D5CFF,
CUDA_EXCLUDED_GPUS_ID = 0x10354FF8,
D3DOGL_GPU_MAX_POWER_ID = 0x10D1EF29,
EXPORT_PERF_COUNTERS_ID = 0x108F0841,
EXTERNAL_QUIET_MODE_ID = 0x10115C8D,
FXAA_ALLOW_ID = 0x1034CB89,
FXAA_ENABLE_ID = 0x1074C972,
FXAA_INDICATOR_ENABLE_ID = 0x1068FB9C,
@@ -92,14 +95,15 @@
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_ID = 0x002ECAF2,
PS_TEXFILTER_NO_NEG_LODBIAS_ID = 0x0019BB68,
QUALITY_ENHANCEMENTS_ID = 0x00CE2691,
QUALITY_ENHANCEMENT_SUBSTITUTION_ID = 0x00CE2692,
REFRESH_RATE_OVERRIDE_ID = 0x0064B541,
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_ID = 0x00AE785C,
SET_VAB_DATA_ID = 0x00AB8687,
VSYNCMODE_ID = 0x00A879CF,
VSYNCTEARCONTROL_ID = 0x005A375C,
TOTAL_DWORD_SETTING_NUM = 92,
TOTAL_DWORD_SETTING_NUM = 96,
TOTAL_WSTRING_SETTING_NUM = 4,
TOTAL_SETTING_NUM = 96,
TOTAL_SETTING_NUM = 100,
INVALID_SETTING_ID = 0xFFFFFFFF
}
@@ -205,6 +209,14 @@
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,
@@ -430,13 +442,19 @@
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DEFAULT = APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DISABLED
}
public enum EValues_BATTERY_BOOST : uint {
BATTERY_BOOST_MIN = 0x00000001,
BATTERY_BOOST_MAX = 0x000000ff,
BATTERY_BOOST_ENABLED = 0x10000000,
BATTERY_BOOST_DISABLED = 0x00000000,
BATTERY_BOOST_NUM_VALUES = 4,
BATTERY_BOOST_DEFAULT = BATTERY_BOOST_DISABLED
public enum EValues_AUTOFL : uint {
AUTOFL_OFF = 0,
AUTOFL_ON = 1,
AUTOFL_NUM_VALUES = 2,
AUTOFL_DEFAULT = AUTOFL_ON
}
public enum EValues_BATTERY_BOOST_APP_FPS : uint {
BATTERY_BOOST_APP_FPS_MIN = 0x00000001,
BATTERY_BOOST_APP_FPS_MAX = 0x000000ff,
BATTERY_BOOST_APP_FPS_NO_OVERRIDE = 0x00000000,
BATTERY_BOOST_APP_FPS_NUM_VALUES = 3,
BATTERY_BOOST_APP_FPS_DEFAULT = BATTERY_BOOST_APP_FPS_NO_OVERRIDE
}
public enum EValues_CPL_HIDDEN_PROFILE : uint {
@@ -453,6 +471,13 @@
EXPORT_PERF_COUNTERS_DEFAULT = EXPORT_PERF_COUNTERS_OFF
}
public enum EValues_EXTERNAL_QUIET_MODE : uint {
EXTERNAL_QUIET_MODE_ON = 0x00000001,
EXTERNAL_QUIET_MODE_OFF = 0x00000000,
EXTERNAL_QUIET_MODE_NUM_VALUES = 2,
EXTERNAL_QUIET_MODE_DEFAULT = EXTERNAL_QUIET_MODE_OFF
}
public enum EValues_FXAA_ALLOW : uint {
FXAA_ALLOW_DISALLOWED = 0,
FXAA_ALLOW_ALLOWED = 1,
@@ -530,9 +555,11 @@
PS_FRAMERATE_LIMITER_FPSMASK = 0x000000ff,
PS_FRAMERATE_LIMITER_NO_ALIGN = 0x00004000,
PS_FRAMERATE_LIMITER_BB_QM = 0x00008000,
PS_FRAMERATE_LIMITER_LOW_LATENCY_AUTO = 0x00010000,
PS_FRAMERATE_LIMITER_LOWER_FPS_TO_ALIGN = 0x00020000,
PS_FRAMERATE_LIMITER_FORCE_VSYNC_OFF = 0x00040000,
PS_FRAMERATE_LIMITER_GPS_WEB = 0x00080000,
PS_FRAMERATE_LIMITER_LOW_LATENCY_LOG = 0x00100000,
PS_FRAMERATE_LIMITER_DISALLOWED = 0x00200000,
PS_FRAMERATE_LIMITER_USE_CPU_WAIT = 0x00400000,
PS_FRAMERATE_LIMITER_NO_LAG_OFFSET = 0x00800000,
@@ -541,8 +568,8 @@
PS_FRAMERATE_LIMITER_FORCEON = 0x40000000,
PS_FRAMERATE_LIMITER_ENABLED = 0x80000000,
PS_FRAMERATE_LIMITER_OPENGL_REMOTE_DESKTOP = 0xe000003c,
PS_FRAMERATE_LIMITER_MASK = 0xf0eec0ff,
PS_FRAMERATE_LIMITER_NUM_VALUES = 19,
PS_FRAMERATE_LIMITER_MASK = 0xf0ffc0ff,
PS_FRAMERATE_LIMITER_NUM_VALUES = 21,
PS_FRAMERATE_LIMITER_DEFAULT = PS_FRAMERATE_LIMITER_DISABLED
}
@@ -581,18 +608,22 @@
PS_FRAMERATE_MONITOR_CTRL_THRESHOLD_PCT_MASK = 0x000000FF,
PS_FRAMERATE_MONITOR_CTRL_MOVING_AVG_X_MASK = 0x00000F00,
PS_FRAMERATE_MONITOR_CTRL_MOVING_AVG_X_SHIFT = 8,
PS_FRAMERATE_MONITOR_CTRL_ENABLE_FINE_GRAINED = 0x00400000,
PS_FRAMERATE_MONITOR_CTRL_LOW_LATENCY_LOG = 0x00100000,
PS_FRAMERATE_MONITOR_CTRL_ENABLE_ON_VSYNC = 0x00800000,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OFFSET_MASK = 0x0000F000,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OFFSET_SHIFT = 12,
PS_FRAMERATE_MONITOR_CTRL_FRL_OFFSET_MASK = 0x000F0000,
PS_FRAMERATE_MONITOR_CTRL_FRL_OFFSET_SHIFT = 16,
PS_FRAMERATE_MONITOR_CTRL_FPS_USE_FRL = 0x00000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_30 = 0x1E000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_60 = 0x3C000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_MASK = 0xFF000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_SHIFT = 24,
PS_FRAMERATE_MONITOR_CTRL_OPTIMAL_SETTING = 0x00000364,
PS_FRAMERATE_MONITOR_CTRL_OPTIMAL_SETTING_V2 = 0x00080364,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OPTIMAL_SETTING = 0x0080f364,
PS_FRAMERATE_MONITOR_CTRL_NUM_VALUES = 15,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OPTIMAL_SETTING_V2 = 0x0088f364,
PS_FRAMERATE_MONITOR_CTRL_NUM_VALUES = 19,
PS_FRAMERATE_MONITOR_CTRL_DEFAULT = PS_FRAMERATE_MONITOR_CTRL_DISABLED
}
@@ -648,8 +679,10 @@
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_NUM_VALUES = 25,
SHIM_RENDERING_OPTIONS_DEFAULT = SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x01000000,
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x02000000,
SHIM_RENDERING_OPTIONS_NUM_VALUES = 27,
SHIM_RENDERING_OPTIONS_DEFAULT = 0x00000000
}
public enum EValues_SLI_GPU_COUNT : uint {
@@ -845,7 +878,7 @@
WKS_STEREO_DONGLE_SUPPORT_DAC = 1,
WKS_STEREO_DONGLE_SUPPORT_DLP = 2,
WKS_STEREO_DONGLE_SUPPORT_NUM_VALUES = 3,
WKS_STEREO_DONGLE_SUPPORT_DEFAULT = WKS_STEREO_DONGLE_SUPPORT_OFF
WKS_STEREO_DONGLE_SUPPORT_DEFAULT = WKS_STEREO_DONGLE_SUPPORT_DAC
}
public enum EValues_WKS_STEREO_SUPPORT : uint {
@@ -960,6 +993,13 @@
QUALITY_ENHANCEMENTS_DEFAULT = QUALITY_ENHANCEMENTS_QUALITY
}
public enum EValues_QUALITY_ENHANCEMENT_SUBSTITUTION : uint {
QUALITY_ENHANCEMENT_SUBSTITUTION_NO_SUBSTITUTION = 0x00000000,
QUALITY_ENHANCEMENT_SUBSTITUTION_HIGHQUALITY_BECOMES_QUALITY = 0x00000001,
QUALITY_ENHANCEMENT_SUBSTITUTION_NUM_VALUES = 2,
QUALITY_ENHANCEMENT_SUBSTITUTION_DEFAULT = QUALITY_ENHANCEMENT_SUBSTITUTION_NO_SUBSTITUTION
}
public enum EValues_REFRESH_RATE_OVERRIDE : uint {
REFRESH_RATE_OVERRIDE_APPLICATION_CONTROLLED = 0x00000000,
REFRESH_RATE_OVERRIDE_HIGHEST_AVAILABLE = 0x00000001,

View File

@@ -55,6 +55,7 @@
#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"
@@ -73,11 +74,13 @@
#define ANSEL_WHITELISTED_STRING L"Ansel flags for enabled applications"
#define APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_STRING L"Application Profile Notification Popup Timeout"
#define APPLICATION_STEAM_ID_STRING L"Steam Application ID"
#define BATTERY_BOOST_STRING L"Battery Boost"
#define AUTOFL_STRING L"Platform Boost"
#define BATTERY_BOOST_APP_FPS_STRING L"Battery Boost Application FPS"
#define CPL_HIDDEN_PROFILE_STRING L"Do not display this profile in the Control Panel"
#define CUDA_EXCLUDED_GPUS_STRING L"List of Universal GPU ids"
#define D3DOGL_GPU_MAX_POWER_STRING L"Maximum GPU Power"
#define EXPORT_PERF_COUNTERS_STRING L"Export Performance Counters"
#define EXTERNAL_QUIET_MODE_STRING L"External Quiet Mode (XQM)"
#define FXAA_ALLOW_STRING L"NVIDIA Predefined FXAA Usage"
#define FXAA_ENABLE_STRING L"Enable FXAA"
#define FXAA_INDICATOR_ENABLE_STRING L"Enable FXAA Indicator"
@@ -116,7 +119,7 @@
#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 <EFBFBD> swap mode"
#define WKS_STEREO_SWAP_MODE_STRING L"Stereo - swap mode"
#define AO_MODE_STRING L"Ambient Occlusion"
#define AO_MODE_ACTIVE_STRING L"NVIDIA Predefined Ambient Occlusion Usage"
#define AUTO_LODBIASADJUST_STRING L"Texture filtering - Driver Controlled LOD Bias"
@@ -131,6 +134,7 @@
#define PS_TEXFILTER_DISABLE_TRILIN_SLOPE_STRING L"Texture filtering - Trilinear optimization"
#define PS_TEXFILTER_NO_NEG_LODBIAS_STRING L"Texture filtering - Negative LOD bias"
#define QUALITY_ENHANCEMENTS_STRING L"Texture filtering - Quality"
#define QUALITY_ENHANCEMENT_SUBSTITUTION_STRING L"Texture filtering - Quality Substitution"
#define REFRESH_RATE_OVERRIDE_STRING L"Preferred refresh rate"
#define SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_STRING L"PowerThrottle"
#define SET_VAB_DATA_STRING L"VAB Default Data"
@@ -153,6 +157,7 @@ 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,
@@ -171,11 +176,13 @@ enum ESetting {
ANSEL_WHITELISTED_ID = 0x1085DA8A,
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_ID = 0x104554B6,
APPLICATION_STEAM_ID_ID = 0x107CDDBC,
BATTERY_BOOST_ID = 0x10115C89,
AUTOFL_ID = 0x10834FFE,
BATTERY_BOOST_APP_FPS_ID = 0x10115C8C,
CPL_HIDDEN_PROFILE_ID = 0x106D5CFF,
CUDA_EXCLUDED_GPUS_ID = 0x10354FF8,
D3DOGL_GPU_MAX_POWER_ID = 0x10D1EF29,
EXPORT_PERF_COUNTERS_ID = 0x108F0841,
EXTERNAL_QUIET_MODE_ID = 0x10115C8D,
FXAA_ALLOW_ID = 0x1034CB89,
FXAA_ENABLE_ID = 0x1074C972,
FXAA_INDICATOR_ENABLE_ID = 0x1068FB9C,
@@ -229,14 +236,15 @@ enum ESetting {
PS_TEXFILTER_DISABLE_TRILIN_SLOPE_ID = 0x002ECAF2,
PS_TEXFILTER_NO_NEG_LODBIAS_ID = 0x0019BB68,
QUALITY_ENHANCEMENTS_ID = 0x00CE2691,
QUALITY_ENHANCEMENT_SUBSTITUTION_ID = 0x00CE2692,
REFRESH_RATE_OVERRIDE_ID = 0x0064B541,
SET_POWER_THROTTLE_FOR_PCIe_COMPLIANCE_ID = 0x00AE785C,
SET_VAB_DATA_ID = 0x00AB8687,
VSYNCMODE_ID = 0x00A879CF,
VSYNCTEARCONTROL_ID = 0x005A375C,
TOTAL_DWORD_SETTING_NUM = 92,
TOTAL_DWORD_SETTING_NUM = 96,
TOTAL_WSTRING_SETTING_NUM = 4,
TOTAL_SETTING_NUM = 96,
TOTAL_SETTING_NUM = 100,
INVALID_SETTING_ID = 0xFFFFFFFF
};
@@ -347,6 +355,14 @@ 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,
@@ -572,13 +588,19 @@ enum EValues_APPLICATION_PROFILE_NOTIFICATION_TIMEOUT {
APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DEFAULT = APPLICATION_PROFILE_NOTIFICATION_TIMEOUT_DISABLED
};
enum EValues_BATTERY_BOOST {
BATTERY_BOOST_MIN = 0x00000001,
BATTERY_BOOST_MAX = 0x000000ff,
BATTERY_BOOST_ENABLED = 0x10000000,
BATTERY_BOOST_DISABLED = 0x00000000,
BATTERY_BOOST_NUM_VALUES = 4,
BATTERY_BOOST_DEFAULT = BATTERY_BOOST_DISABLED
enum EValues_AUTOFL {
AUTOFL_OFF = 0,
AUTOFL_ON = 1,
AUTOFL_NUM_VALUES = 2,
AUTOFL_DEFAULT = AUTOFL_ON
};
enum EValues_BATTERY_BOOST_APP_FPS {
BATTERY_BOOST_APP_FPS_MIN = 0x00000001,
BATTERY_BOOST_APP_FPS_MAX = 0x000000ff,
BATTERY_BOOST_APP_FPS_NO_OVERRIDE = 0x00000000,
BATTERY_BOOST_APP_FPS_NUM_VALUES = 3,
BATTERY_BOOST_APP_FPS_DEFAULT = BATTERY_BOOST_APP_FPS_NO_OVERRIDE
};
enum EValues_CPL_HIDDEN_PROFILE {
@@ -603,6 +625,13 @@ enum EValues_EXPORT_PERF_COUNTERS {
EXPORT_PERF_COUNTERS_DEFAULT = EXPORT_PERF_COUNTERS_OFF
};
enum EValues_EXTERNAL_QUIET_MODE {
EXTERNAL_QUIET_MODE_ON = 0x00000001,
EXTERNAL_QUIET_MODE_OFF = 0x00000000,
EXTERNAL_QUIET_MODE_NUM_VALUES = 2,
EXTERNAL_QUIET_MODE_DEFAULT = EXTERNAL_QUIET_MODE_OFF
};
enum EValues_FXAA_ALLOW {
FXAA_ALLOW_DISALLOWED = 0,
FXAA_ALLOW_ALLOWED = 1,
@@ -680,9 +709,11 @@ enum EValues_PS_FRAMERATE_LIMITER {
PS_FRAMERATE_LIMITER_FPSMASK = 0x000000ff,
PS_FRAMERATE_LIMITER_NO_ALIGN = 0x00004000,
PS_FRAMERATE_LIMITER_BB_QM = 0x00008000,
PS_FRAMERATE_LIMITER_LOW_LATENCY_AUTO = 0x00010000,
PS_FRAMERATE_LIMITER_LOWER_FPS_TO_ALIGN = 0x00020000,
PS_FRAMERATE_LIMITER_FORCE_VSYNC_OFF = 0x00040000,
PS_FRAMERATE_LIMITER_GPS_WEB = 0x00080000,
PS_FRAMERATE_LIMITER_LOW_LATENCY_LOG = 0x00100000,
PS_FRAMERATE_LIMITER_DISALLOWED = 0x00200000,
PS_FRAMERATE_LIMITER_USE_CPU_WAIT = 0x00400000,
PS_FRAMERATE_LIMITER_NO_LAG_OFFSET = 0x00800000,
@@ -691,8 +722,8 @@ enum EValues_PS_FRAMERATE_LIMITER {
PS_FRAMERATE_LIMITER_FORCEON = 0x40000000,
PS_FRAMERATE_LIMITER_ENABLED = 0x80000000,
PS_FRAMERATE_LIMITER_OPENGL_REMOTE_DESKTOP = 0xe000003c,
PS_FRAMERATE_LIMITER_MASK = 0xf0eec0ff,
PS_FRAMERATE_LIMITER_NUM_VALUES = 19,
PS_FRAMERATE_LIMITER_MASK = 0xf0ffc0ff,
PS_FRAMERATE_LIMITER_NUM_VALUES = 21,
PS_FRAMERATE_LIMITER_DEFAULT = PS_FRAMERATE_LIMITER_DISABLED
};
@@ -731,18 +762,22 @@ enum EValues_PS_FRAMERATE_MONITOR_CTRL {
PS_FRAMERATE_MONITOR_CTRL_THRESHOLD_PCT_MASK = 0x000000FF,
PS_FRAMERATE_MONITOR_CTRL_MOVING_AVG_X_MASK = 0x00000F00,
PS_FRAMERATE_MONITOR_CTRL_MOVING_AVG_X_SHIFT = 8,
PS_FRAMERATE_MONITOR_CTRL_ENABLE_FINE_GRAINED = 0x00400000,
PS_FRAMERATE_MONITOR_CTRL_LOW_LATENCY_LOG = 0x00100000,
PS_FRAMERATE_MONITOR_CTRL_ENABLE_ON_VSYNC = 0x00800000,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OFFSET_MASK = 0x0000F000,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OFFSET_SHIFT = 12,
PS_FRAMERATE_MONITOR_CTRL_FRL_OFFSET_MASK = 0x000F0000,
PS_FRAMERATE_MONITOR_CTRL_FRL_OFFSET_SHIFT = 16,
PS_FRAMERATE_MONITOR_CTRL_FPS_USE_FRL = 0x00000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_30 = 0x1E000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_60 = 0x3C000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_MASK = 0xFF000000,
PS_FRAMERATE_MONITOR_CTRL_FPS_SHIFT = 24,
PS_FRAMERATE_MONITOR_CTRL_OPTIMAL_SETTING = 0x00000364,
PS_FRAMERATE_MONITOR_CTRL_OPTIMAL_SETTING_V2 = 0x00080364,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OPTIMAL_SETTING = 0x0080f364,
PS_FRAMERATE_MONITOR_CTRL_NUM_VALUES = 15,
PS_FRAMERATE_MONITOR_CTRL_VSYNC_OPTIMAL_SETTING_V2 = 0x0088f364,
PS_FRAMERATE_MONITOR_CTRL_NUM_VALUES = 19,
PS_FRAMERATE_MONITOR_CTRL_DEFAULT = PS_FRAMERATE_MONITOR_CTRL_DISABLED
};
@@ -798,8 +833,10 @@ enum EValues_SHIM_RENDERING_OPTIONS {
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_NUM_VALUES = 25,
SHIM_RENDERING_OPTIONS_DEFAULT = SHIM_RENDERING_OPTIONS_DEFAULT_RENDERING_MODE
SHIM_RENDERING_OPTIONS_ALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x01000000,
SHIM_RENDERING_OPTIONS_DISALLOW_DYNAMIC_DISPLAY_MUX_SWITCH = 0x02000000,
SHIM_RENDERING_OPTIONS_NUM_VALUES = 27,
SHIM_RENDERING_OPTIONS_DEFAULT = 0x00000000
};
enum EValues_SLI_GPU_COUNT {
@@ -995,7 +1032,7 @@ enum EValues_WKS_STEREO_DONGLE_SUPPORT {
WKS_STEREO_DONGLE_SUPPORT_DAC = 1,
WKS_STEREO_DONGLE_SUPPORT_DLP = 2,
WKS_STEREO_DONGLE_SUPPORT_NUM_VALUES = 3,
WKS_STEREO_DONGLE_SUPPORT_DEFAULT = WKS_STEREO_DONGLE_SUPPORT_OFF
WKS_STEREO_DONGLE_SUPPORT_DEFAULT = WKS_STEREO_DONGLE_SUPPORT_DAC
};
enum EValues_WKS_STEREO_SUPPORT {
@@ -1037,7 +1074,6 @@ enum EValues_AUTO_LODBIASADJUST {
AUTO_LODBIASADJUST_DEFAULT = AUTO_LODBIASADJUST_ON
};
enum EValues_EXPORT_PERF_COUNTERS_DX9_ONLY {
EXPORT_PERF_COUNTERS_DX9_ONLY_OFF = 0x00000000,
EXPORT_PERF_COUNTERS_DX9_ONLY_ON = 0x00000001,
@@ -1111,6 +1147,13 @@ enum EValues_QUALITY_ENHANCEMENTS {
QUALITY_ENHANCEMENTS_DEFAULT = QUALITY_ENHANCEMENTS_QUALITY
};
enum EValues_QUALITY_ENHANCEMENT_SUBSTITUTION {
QUALITY_ENHANCEMENT_SUBSTITUTION_NO_SUBSTITUTION = 0x00000000,
QUALITY_ENHANCEMENT_SUBSTITUTION_HIGHQUALITY_BECOMES_QUALITY = 0x00000001,
QUALITY_ENHANCEMENT_SUBSTITUTION_NUM_VALUES = 2,
QUALITY_ENHANCEMENT_SUBSTITUTION_DEFAULT = QUALITY_ENHANCEMENT_SUBSTITUTION_NO_SUBSTITUTION
};
enum EValues_REFRESH_RATE_OVERRIDE {
REFRESH_RATE_OVERRIDE_APPLICATION_CONTROLLED = 0x00000000,
REFRESH_RATE_OVERRIDE_HIGHEST_AVAILABLE = 0x00000001,

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace nspector.Native
{
@@ -51,6 +49,6 @@ namespace nspector.Native
targetPointer = Marshal.AllocHGlobal(sizeOfItem);
Marshal.StructureToPtr(item, targetPointer, true);
}
}
}

View File

@@ -287,7 +287,7 @@ namespace nspector.Native.WINAPI
internal string lpData;
}
internal struct WINDOWPLACEMENT
{
internal int length;
@@ -301,7 +301,7 @@ namespace nspector.Native.WINAPI
internal bool bringAppToFront(int hWnd)
{
WINDOWPLACEMENT param = new WINDOWPLACEMENT();
if (GetWindowPlacement(hWnd,ref param))
if (GetWindowPlacement(hWnd, ref param))
{
if (param.showCmd != SW_NORMAL)
{
@@ -312,7 +312,7 @@ namespace nspector.Native.WINAPI
}
return SetForegroundWindow(hWnd);
}
internal int sendWindowsStringMessage(int hWnd, int wParam, string msg)
{
int result = 0;

View File

@@ -241,7 +241,7 @@ namespace nspector.Native.WINAPI
private class NativeMethods
{
[DllImport("Shell32", CharSet = CharSet.Auto)]
internal extern static int ExtractIconEx([MarshalAs(UnmanagedType.LPTStr)]
internal extern static int ExtractIconEx([MarshalAs(UnmanagedType.LPTStr)]
string lpszFile,
int nIconIndex,
IntPtr[] phIconLarge,

View File

@@ -25,7 +25,7 @@ namespace nspector.Native.WINAPI
THBF_NOBACKGROUND = 0x0004,
THBF_HIDDEN = 0x0008
}
[Flags]
internal enum THB
{
@@ -37,18 +37,18 @@ namespace nspector.Native.WINAPI
}
internal enum TBPFLAG
{
TBPF_NOPROGRESS = 0,
TBPF_INDETERMINATE = 0x1,
TBPF_NORMAL = 0x2,
TBPF_ERROR = 0x4,
TBPF_PAUSED = 0x8
{
TBPF_NOPROGRESS = 0,
TBPF_INDETERMINATE = 0x1,
TBPF_NORMAL = 0x2,
TBPF_ERROR = 0x4,
TBPF_PAUSED = 0x8
}
internal enum TBATFLAG
{
TBATF_USEMDITHUMBNAIL = 0x1,
TBATF_USEMDILIVEPREVIEW = 0x2
{
TBATF_USEMDITHUMBNAIL = 0x1,
TBATF_USEMDILIVEPREVIEW = 0x2
}
[ComImport,
@@ -57,7 +57,7 @@ namespace nspector.Native.WINAPI
internal interface ITaskbarList3
{
[MethodImpl(MethodImplOptions.InternalCall,
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void HrInit();
@@ -79,7 +79,7 @@ namespace nspector.Native.WINAPI
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void MarkFullscreenWindow([In] IntPtr hwnd,
void MarkFullscreenWindow([In] IntPtr hwnd,
[In, MarshalAs(UnmanagedType.Bool)] bool fFullscreen);
[MethodImpl(MethodImplOptions.InternalCall,
@@ -87,8 +87,8 @@ namespace nspector.Native.WINAPI
void SetProgressValue([In] IntPtr hwnd,
[In] ulong ullCompleted,
[In] ulong ullTotal);
[MethodImpl(MethodImplOptions.InternalCall,
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
void SetProgressState([In] IntPtr hwnd,
[In] TBPFLAG tbpFlags);
@@ -120,7 +120,7 @@ namespace nspector.Native.WINAPI
[In] uint cButtons,
[In] IntPtr pButton);
///* [size_is][in] */ __RPC__in_ecount_full(cButtons) LPTHUMBBUTTON pButton);
//preliminary
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType = MethodCodeType.Runtime)]
@@ -150,7 +150,7 @@ namespace nspector.Native.WINAPI
MethodCodeType = MethodCodeType.Runtime)]
void SetThumbnailClip([In] IntPtr hwnd,
[In] IntPtr prcClip);
}

View File

@@ -4,7 +4,7 @@ using System.IO;
using System.Threading;
using System.Windows.Forms;
using nspector.Common;
using nspector.Common.Import;
using nspector.Common.Helper;
using nspector.Native.WINAPI;
namespace nspector
@@ -29,6 +29,7 @@ namespace nspector
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
DropDownMenuScrollWheelHandler.Enable(true);
var argFileIndex = ArgFileIndex(args);
if (argFileIndex != -1)

View File

@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NVIDIA Profile Inspector")]
[assembly: AssemblyCopyright("©2019 by Orbmu2k")]
[assembly: AssemblyCopyright("©2020 by Orbmu2k")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -32,7 +32,7 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]

View File

@@ -19,7 +19,7 @@ namespace nspector.Properties {
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -76,13 +76,14 @@ namespace nspector.Properties {
/// &lt;ShowCustomizedSettingNamesOnly&gt;false&lt;/ShowCustomizedSettingNamesOnly&gt;
/// &lt;Settings&gt;
/// &lt;CustomSetting&gt;
/// &lt;UserfriendlyName&gt;Enable Maxwell sample interleaving (MFAA)&lt;/UserfriendlyName&gt;
/// &lt;HexSettingID&gt;0x0098C1AC&lt;/HexSettingID&gt;
/// &lt;GroupName&gt;3 - Antialiasing&lt;/GroupName&gt;
/// &lt;MinRequiredDriverVersion&gt;344.11&lt;/MinRequiredDriverVersion&gt;
/// &lt;SettingValues&gt;
/// &lt;CustomSettingValue&gt;
/// &lt;UserfriendlyName&gt;Off&lt;/Userfrie [Rest der Zeichenfolge wurde abgeschnitten]&quot;; ähnelt.
/// &lt;UserfriendlyName&gt;NVLINK SLI Mode&lt;/UserfriendlyName&gt;
/// &lt;HexSettingID&gt;0x00A06948&lt;/HexSettingID&gt;
/// &lt;GroupName&gt;6 - SLI&lt;/GroupName&gt;
/// &lt;MinRequiredDriverVersion&gt;410.00&lt;/MinRequiredDriverVersion&gt;
/// &lt;/CustomSetting&gt;
/// &lt;CustomSetting&gt;
/// &lt;UserfriendlyName&gt;Texture filtering - Quality substitution&lt;/UserfriendlyName&gt;
/// [Rest der Zeichenfolge wurde abgeschnitten]&quot;; ähnelt.
/// </summary>
public static string CustomSettingNames {
get {

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

View File

@@ -4,6 +4,7 @@ using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using nspector.Common;
using nspector.Common.CustomSettings;
@@ -210,24 +211,30 @@ namespace nspector
.SetDwordValueToProfile(_SettingsOwner._CurrentProfile, _Settingid, val);
}
private uint GetStoredValue()
{
return DrsServiceLocator
.SettingService
.GetDwordValueFromProfile(_SettingsOwner._CurrentProfile, _Settingid);
}
private void btnDirectApply_Click(object sender, EventArgs e)
private async void btnDirectApply_Click(object sender, EventArgs e)
{
ApplyValueToProfile(_CurrentValue);
while (GetStoredValue() != _CurrentValue)
Application.DoEvents();
await CheckIfSettingIsStored();
if (File.Exists(tbGamePath.Text))
{
Process.Start(tbGamePath.Text);
}
}
private async Task CheckIfSettingIsStored()
{
await Task.Run(async () =>
{
while (_CurrentValue != DrsServiceLocator.SettingService
.GetDwordValueFromProfile(_SettingsOwner._CurrentProfile, _Settingid, false, true))
{
await Task.Delay(50);
}
});
}
private void btnBrowseGame_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();

View File

@@ -91,10 +91,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(12, 475);
this.pbMain.Margin = new System.Windows.Forms.Padding(4);
this.pbMain.Location = new System.Drawing.Point(16, 585);
this.pbMain.Margin = new System.Windows.Forms.Padding(5);
this.pbMain.Name = "pbMain";
this.pbMain.Size = new System.Drawing.Size(840, 9);
this.pbMain.Size = new System.Drawing.Size(1120, 11);
this.pbMain.TabIndex = 19;
//
// tsMain
@@ -132,10 +132,10 @@
this.tsSep6,
this.tsbApplyProfile});
this.tsMain.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.tsMain.Location = new System.Drawing.Point(12, 4);
this.tsMain.Location = new System.Drawing.Point(16, 5);
this.tsMain.Name = "tsMain";
this.tsMain.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
this.tsMain.Size = new System.Drawing.Size(840, 25);
this.tsMain.Size = new System.Drawing.Size(1120, 31);
this.tsMain.TabIndex = 24;
this.tsMain.Text = "toolStrip1";
//
@@ -144,7 +144,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(49, 18);
this.tslProfiles.Size = new System.Drawing.Size(61, 24);
this.tslProfiles.Text = "Profiles:";
//
// cbProfiles
@@ -156,7 +156,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(290, 23);
this.cbProfiles.Size = new System.Drawing.Size(385, 28);
this.cbProfiles.SelectedIndexChanged += new System.EventHandler(this.cbProfiles_SelectedIndexChanged);
this.cbProfiles.TextChanged += new System.EventHandler(this.cbProfiles_TextChanged);
//
@@ -167,7 +167,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(36, 22);
this.tsbModifiedProfiles.Size = new System.Drawing.Size(39, 28);
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 +176,7 @@
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
//
// tsbRefreshProfile
//
@@ -184,7 +184,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, 22);
this.tsbRefreshProfile.Size = new System.Drawing.Size(24, 28);
this.tsbRefreshProfile.Text = "Refresh current profile.";
this.tsbRefreshProfile.Click += new System.EventHandler(this.tsbRefreshProfile_Click);
//
@@ -194,7 +194,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, 22);
this.tsbRestoreProfile.Size = new System.Drawing.Size(24, 28);
this.tsbRestoreProfile.Text = "Restore current profile to NVIDIA defaults.";
this.tsbRestoreProfile.Click += new System.EventHandler(this.tsbRestoreProfile_Click);
//
@@ -204,7 +204,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, 22);
this.tsbCreateProfile.Size = new System.Drawing.Size(24, 28);
this.tsbCreateProfile.Text = "Create new profile";
this.tsbCreateProfile.Click += new System.EventHandler(this.tsbCreateProfile_Click);
//
@@ -214,14 +214,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, 22);
this.tsbDeleteProfile.Size = new System.Drawing.Size(24, 28);
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, 25);
this.tsSep2.Size = new System.Drawing.Size(6, 31);
//
// tsbAddApplication
//
@@ -229,7 +229,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, 22);
this.tsbAddApplication.Size = new System.Drawing.Size(24, 28);
this.tsbAddApplication.Text = "Add application to current profile.";
this.tsbAddApplication.Click += new System.EventHandler(this.tsbAddApplication_Click);
//
@@ -239,7 +239,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(36, 22);
this.tssbRemoveApplication.Size = new System.Drawing.Size(39, 28);
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 +247,7 @@
// tsSep3
//
this.tsSep3.Name = "tsSep3";
this.tsSep3.Size = new System.Drawing.Size(6, 25);
this.tsSep3.Size = new System.Drawing.Size(6, 31);
//
// tsbExportProfiles
//
@@ -260,35 +260,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(36, 22);
this.tsbExportProfiles.Size = new System.Drawing.Size(39, 28);
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(342, 22);
this.exportCurrentProfileOnlyToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
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(342, 22);
this.exportCurrentProfileIncludingPredefinedSettingsToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
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(342, 22);
this.exportUserdefinedProfilesToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
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(342, 22);
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(422, 26);
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Text = "Export all driver profiles (NVIDIA Text Format)";
this.exportAllProfilesNVIDIATextFormatToolStripMenuItem.Click += new System.EventHandler(this.exportAllProfilesNVIDIATextFormatToolStripMenuItem_Click);
//
@@ -301,28 +301,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(36, 22);
this.tsbImportProfiles.Size = new System.Drawing.Size(39, 28);
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(364, 22);
this.importProfilesToolStripMenuItem.Size = new System.Drawing.Size(453, 26);
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(364, 22);
this.importAllProfilesNVIDIATextFormatToolStripMenuItem.Size = new System.Drawing.Size(453, 26);
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, 25);
this.tsSep4.Size = new System.Drawing.Size(6, 31);
//
// tscbShowCustomSettingNamesOnly
//
@@ -331,14 +331,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, 22);
this.tscbShowCustomSettingNamesOnly.Size = new System.Drawing.Size(24, 28);
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, 25);
this.tsSep5.Size = new System.Drawing.Size(6, 31);
//
// tscbShowScannedUnknownSettings
//
@@ -348,7 +348,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, 22);
this.tscbShowScannedUnknownSettings.Size = new System.Drawing.Size(24, 28);
this.tscbShowScannedUnknownSettings.Text = "Show unknown settings from NVIDIA predefined profiles";
this.tscbShowScannedUnknownSettings.Click += new System.EventHandler(this.tscbShowScannedUnknownSettings_Click);
//
@@ -358,14 +358,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, 22);
this.tsbBitValueEditor.Size = new System.Drawing.Size(24, 28);
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, 25);
this.tsSep6.Size = new System.Drawing.Size(6, 31);
//
// tsbApplyProfile
//
@@ -374,7 +374,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(109, 22);
this.tsbApplyProfile.Size = new System.Drawing.Size(130, 28);
this.tsbApplyProfile.Text = "Apply changes";
this.tsbApplyProfile.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.tsbApplyProfile.Click += new System.EventHandler(this.tsbApplyProfile_Click);
@@ -384,10 +384,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(732, 175);
this.btnResetValue.Location = new System.Drawing.Point(976, 215);
this.btnResetValue.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
this.btnResetValue.Name = "btnResetValue";
this.btnResetValue.Size = new System.Drawing.Size(25, 19);
this.btnResetValue.Size = new System.Drawing.Size(33, 23);
this.btnResetValue.TabIndex = 7;
this.btnResetValue.UseVisualStyleBackColor = true;
this.btnResetValue.Click += new System.EventHandler(this.btnResetValue_Click);
@@ -399,10 +399,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(12, 32);
this.lblApplications.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblApplications.Location = new System.Drawing.Point(16, 39);
this.lblApplications.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.lblApplications.Name = "lblApplications";
this.lblApplications.Size = new System.Drawing.Size(840, 17);
this.lblApplications.Size = new System.Drawing.Size(1120, 21);
this.lblApplications.TabIndex = 25;
this.lblApplications.Text = "fsagame.exe, bond.exe, herozero.exe";
//
@@ -440,10 +440,10 @@
//
this.cbValues.BackColor = System.Drawing.SystemColors.Window;
this.cbValues.FormattingEnabled = true;
this.cbValues.Location = new System.Drawing.Point(524, 175);
this.cbValues.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.cbValues.Location = new System.Drawing.Point(699, 215);
this.cbValues.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.cbValues.Name = "cbValues";
this.cbValues.Size = new System.Drawing.Size(72, 21);
this.cbValues.Size = new System.Drawing.Size(95, 24);
this.cbValues.TabIndex = 5;
this.cbValues.Visible = false;
this.cbValues.SelectedValueChanged += new System.EventHandler(this.cbValues_SelectedValueChanged);
@@ -451,40 +451,40 @@
//
// lblWidth96
//
this.lblWidth96.Location = new System.Drawing.Point(77, 233);
this.lblWidth96.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth96.Location = new System.Drawing.Point(103, 287);
this.lblWidth96.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.lblWidth96.Name = "lblWidth96";
this.lblWidth96.Size = new System.Drawing.Size(96, 18);
this.lblWidth96.Size = new System.Drawing.Size(128, 22);
this.lblWidth96.TabIndex = 77;
this.lblWidth96.Text = "96";
this.lblWidth96.Visible = false;
//
// lblWidth330
//
this.lblWidth330.Location = new System.Drawing.Point(77, 210);
this.lblWidth330.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth330.Location = new System.Drawing.Point(103, 258);
this.lblWidth330.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.lblWidth330.Name = "lblWidth330";
this.lblWidth330.Size = new System.Drawing.Size(330, 22);
this.lblWidth330.Size = new System.Drawing.Size(440, 27);
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(77, 269);
this.lblWidth16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth16.Location = new System.Drawing.Point(103, 331);
this.lblWidth16.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.lblWidth16.Name = "lblWidth16";
this.lblWidth16.Size = new System.Drawing.Size(16, 18);
this.lblWidth16.Size = new System.Drawing.Size(21, 22);
this.lblWidth16.TabIndex = 79;
this.lblWidth16.Text = "16";
this.lblWidth16.Visible = false;
//
// lblWidth30
//
this.lblWidth30.Location = new System.Drawing.Point(77, 251);
this.lblWidth30.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWidth30.Location = new System.Drawing.Point(103, 309);
this.lblWidth30.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.lblWidth30.Name = "lblWidth30";
this.lblWidth30.Size = new System.Drawing.Size(30, 18);
this.lblWidth30.Size = new System.Drawing.Size(40, 22);
this.lblWidth30.TabIndex = 80;
this.lblWidth30.Text = "30";
this.lblWidth30.Visible = false;
@@ -501,12 +501,12 @@
this.lvSettings.FullRowSelect = true;
this.lvSettings.GridLines = true;
this.lvSettings.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvSettings.Location = new System.Drawing.Point(12, 51);
this.lvSettings.Margin = new System.Windows.Forms.Padding(4);
this.lvSettings.Location = new System.Drawing.Point(16, 63);
this.lvSettings.Margin = new System.Windows.Forms.Padding(5);
this.lvSettings.MultiSelect = false;
this.lvSettings.Name = "lvSettings";
this.lvSettings.ShowItemToolTips = true;
this.lvSettings.Size = new System.Drawing.Size(840, 418);
this.lvSettings.Size = new System.Drawing.Size(1119, 514);
this.lvSettings.SmallImageList = this.ilListView;
this.lvSettings.TabIndex = 2;
this.lvSettings.UseCompatibleStateImageBehavior = false;
@@ -514,8 +514,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.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvSettings_KeyDown);
this.lvSettings.Resize += new System.EventHandler(this.lvSettings_Resize);
this.lvSettings.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvSettings_KeyDown);
//
// chSettingID
//
@@ -534,9 +534,9 @@
//
// frmDrvSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(864, 492);
this.ClientSize = new System.Drawing.Size(1152, 606);
this.Controls.Add(this.lblWidth30);
this.Controls.Add(this.lblWidth16);
this.Controls.Add(this.lblWidth330);
@@ -547,12 +547,13 @@
this.Controls.Add(this.pbMain);
this.Controls.Add(this.btnResetValue);
this.Controls.Add(this.cbValues);
this.Margin = new System.Windows.Forms.Padding(4);
this.MinimumSize = new System.Drawing.Size(880, 348);
this.Margin = new System.Windows.Forms.Padding(5);
this.MinimumSize = new System.Drawing.Size(1167, 417);
this.Name = "frmDrvSettings";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "nSpector - Driver Profile Settings";
this.Activated += new System.EventHandler(this.frmDrvSettings_Activated);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmDrvSettings_FormClosed);
this.Load += new System.EventHandler(this.frmDrvSettings_Load);
this.Shown += new System.EventHandler(this.frmDrvSettings_Shown);
this.tsMain.ResumeLayout(false);

View File

@@ -1,30 +1,29 @@
using System;
using System.Collections;
using nspector.Common;
using nspector.Common.Helper;
using nspector.Native.NVAPI2;
using nspector.Native.WINAPI;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using nspector.Common;
using nspector.Common.Helper;
using nspector.Native.NVAPI2;
using nspector.Native.WINAPI;
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
using System.Text.RegularExpressions;
using System.Diagnostics;
namespace nspector
{
internal partial class frmDrvSettings : Form
{
readonly DrsSettingsMetaService _meta = DrsServiceLocator.MetaService;
readonly DrsSettingsService _drs = DrsServiceLocator.SettingService;
readonly DrsScannerService _scanner = DrsServiceLocator.ScannerService;
readonly DrsImportService _import = DrsServiceLocator.ImportService;
private readonly DrsSettingsMetaService _meta = DrsServiceLocator.MetaService;
private readonly DrsSettingsService _drs = DrsServiceLocator.SettingService;
private readonly DrsScannerService _scanner = DrsServiceLocator.ScannerService;
private readonly DrsImportService _import = DrsServiceLocator.ImportService;
private List<SettingItem> _currentProfileSettingItems = new List<SettingItem>();
private bool _alreadyScannedForPredefinedSettings = false;
@@ -32,7 +31,7 @@ namespace nspector
private bool _activated = false;
private bool _isStartup = true;
private bool _skipScan = false;
private string _baseProfileName = "";
private bool _isWin7TaskBar = false;
private int _lastComboRowIndex = -1;
@@ -50,6 +49,7 @@ namespace nspector
copyDataStruct = (MessageHelper.COPYDATASTRUCT)m.GetLParam(copyDataType);
if (copyDataStruct.lpData.Equals("ProfilesImported"))
{
DrsSessionScope.DestroyGlobalSession();
RefreshAll();
}
break;
@@ -108,15 +108,16 @@ namespace nspector
return item;
}
private void RefreshApplicationsCombosAndText(List<string> applications)
private void RefreshApplicationsCombosAndText(Dictionary<string,string> applications)
{
lblApplications.Text = "";
tssbRemoveApplication.DropDownItems.Clear();
lblApplications.Text = " " + string.Join(", ", applications);
lblApplications.Text = " " + string.Join(", ", applications.Select(x=>x.Value));
foreach (var app in applications)
{
tssbRemoveApplication.DropDownItems.Add(app, Properties.Resources.ieframe_1_18212);
var item = tssbRemoveApplication.DropDownItems.Add(app.Value, Properties.Resources.ieframe_1_18212);
item.Tag = app.Key;
}
tssbRemoveApplication.Enabled = (tssbRemoveApplication.DropDownItems.Count > 0);
}
@@ -142,7 +143,7 @@ namespace nspector
{
lvSettings.Items.Clear();
lvSettings.Groups.Clear();
var applications = new List<string>();
var applications = new Dictionary<string,string>();
_currentProfileSettingItems = _drs.GetSettingsForProfile(_CurrentProfile, GetSettingViewMode(), ref applications);
RefreshApplicationsCombosAndText(applications);
@@ -224,7 +225,7 @@ namespace nspector
itm = v;
cbValues.Items.Add(itm);
}
}
@@ -268,7 +269,7 @@ namespace nspector
cbValues.Visible = true;
}
}
else
@@ -310,7 +311,7 @@ namespace nspector
{
var settingId = (uint)cbValues.Tag;
var activeImages = new[] { 0, 2 };
int idx = GetListViewIndexOfSetting(settingId);
if (idx != -1)
{
@@ -454,16 +455,7 @@ namespace nspector
var numberFormat = new NumberFormatInfo() { NumberDecimalSeparator = "." };
var version = Assembly.GetExecutingAssembly().GetName().Version;
var fileVersionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
var titleText = string.Format("{8} {0}.{1}{5}{2}{5}{4} - {6} Profile Settings {3}- {7}",
version.Major, version.Minor, version.Build, AdminHelper.IsAdmin ? "(Elevated) " : "",
(version.Revision > 0 ? version.Revision.ToString() : ""),
(version.Revision > 0 ? "." : ""),
(_drs.DriverVersion > 0) ? "GeForce " + _drs.DriverVersion.ToString("#.00", numberFormat) + " -" : "Driver",
fileVersionInfo.LegalCopyright,
Application.ProductName
);
Text = titleText;
Text = $"{Application.ProductName} {version} - Geforce {_drs.DriverVersion.ToString("#.00", numberFormat)} - Profile Settings - {fileVersionInfo.LegalCopyright}";
}
private static void InitMessageFilter(IntPtr handle)
@@ -481,14 +473,13 @@ namespace nspector
DragAcceptNativeHelper.ChangeWindowMessageFilter(DragAcceptNativeHelper.WM_COPYGLOBALDATA, DragAcceptNativeHelper.MSGFLT_ADD);
}
}
internal frmDrvSettings() : this(false, false) { }
internal frmDrvSettings(bool showCsnOnly, bool skipScan)
{
_skipScan = skipScan;
InitializeComponent();
InitTaskbarList();
InitScannerEvents();
SetupDropFilesNative();
SetupToolbar();
SetupDpiAdjustments();
@@ -524,7 +515,7 @@ namespace nspector
Height = Screen.GetWorkingArea(this).Height - 20;
}
}
private void RefreshModifiesProfilesDropDown()
{
tsbModifiedProfiles.DropDownItems.Clear();
@@ -547,6 +538,7 @@ namespace nspector
{
SetupLayout();
SetTitleVersion();
LoadSettings();
RefreshProfilesCombo();
cbProfiles.Text = GetBaseProfileName();
@@ -632,7 +624,7 @@ namespace nspector
catch { }
}
}
private void AddToModifiedProfiles(string profileName, bool userProfile = false)
{
if (!_scanner.UserProfiles.Contains(profileName) && profileName != _baseProfileName && userProfile)
@@ -661,134 +653,75 @@ namespace nspector
}
}
private void InvokeUi(Control invokeControl, Action action)
private void ShowExportProfiles()
{
MethodInvoker mi = () => action();
if (invokeControl.InvokeRequired)
invokeControl.BeginInvoke(mi);
if (_scanner.ModifiedProfiles.Count > 0)
{
var frmExport = new frmExportProfiles();
frmExport.ShowDialog(this);
}
else
mi.Invoke();
}
private void frmDrvSettings_OnModifiedScanDoneAndShowExport()
{
InvokeUi(this, () =>
{
pbMain.Value = 0;
pbMain.Enabled = false;
SetTaskbarProgress(0);
if (_scanner.ModifiedProfiles.Count > 0)
{
var frmExport = new frmExportProfiles();
frmExport.ShowDialog(this);
}
else
MessageBox.Show("No user modified profiles found! Nothing to export.", "Userprofile Search", MessageBoxButtons.OK, MessageBoxIcon.Information);
RefreshModifiesProfilesDropDown();
tsbRefreshProfile.Enabled = true;
});
MessageBox.Show("No user modified profiles found! Nothing to export.", "Userprofile Search", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void frmDrvSettings_OnPredefinedScanDoneAndStartModifiedProfileScan()
{
private CancellationTokenSource _scannerCancelationTokenSource;
InvokeUi(this, () =>
{
pbMain.Value = 0;
pbMain.Enabled = false;
SetTaskbarProgress(0);
tscbShowScannedUnknownSettings.Enabled = true;
});
StartModifiedProfilesScan(false);
}
private void frmDrvSettings_OnScanDoneDoNothing()
{
_meta.ResetMetaCache();
InvokeUi(this, () =>
{
pbMain.Value = 0;
pbMain.Enabled = false;
SetTaskbarProgress(0);
RefreshCurrentProfile();
RefreshModifiesProfilesDropDown();
tsbRefreshProfile.Enabled = true;
});
}
private void frmDrvSettings_OnSettingScanProgress(int percent)
{
InvokeUi(this, () =>
{
pbMain.Value = percent;
SetTaskbarProgress(percent);
});
}
private void InitScannerEvents()
{
_scanner.OnSettingScanProgress += new Common.SettingScanProgressEvent(frmDrvSettings_OnSettingScanProgress);
_scanner.OnPredefinedSettingsScanDone += new Common.SettingScanDoneEvent(frmDrvSettings_OnScanDoneDoNothing);
_scanner.OnModifiedProfilesScanDone += new Common.SettingScanDoneEvent(frmDrvSettings_OnScanDoneDoNothing);
}
private void StartModifiedProfilesScan(bool showProfilesDialog)
{
pbMain.Minimum = 0;
pbMain.Maximum = 100;
_scanner.OnModifiedProfilesScanDone -= new Common.SettingScanDoneEvent(frmDrvSettings_OnScanDoneDoNothing);
_scanner.OnModifiedProfilesScanDone -= new Common.SettingScanDoneEvent(frmDrvSettings_OnModifiedScanDoneAndShowExport);
if (showProfilesDialog)
_scanner.OnModifiedProfilesScanDone += new Common.SettingScanDoneEvent(frmDrvSettings_OnModifiedScanDoneAndShowExport);
else
_scanner.OnModifiedProfilesScanDone += new Common.SettingScanDoneEvent(frmDrvSettings_OnScanDoneDoNothing);
_scanner.StartScanForModifiedProfilesAsync();
}
private void StartPredefinedSettingsScan(bool startModifiedProfileScan)
{
pbMain.Minimum = 0;
pbMain.Maximum = 100;
_scanner.OnPredefinedSettingsScanDone -= new Common.SettingScanDoneEvent(frmDrvSettings_OnScanDoneDoNothing);
_scanner.OnPredefinedSettingsScanDone -= new Common.SettingScanDoneEvent(frmDrvSettings_OnPredefinedScanDoneAndStartModifiedProfileScan);
if (startModifiedProfileScan)
_scanner.OnPredefinedSettingsScanDone += new Common.SettingScanDoneEvent(frmDrvSettings_OnPredefinedScanDoneAndStartModifiedProfileScan);
else
_scanner.OnPredefinedSettingsScanDone += new Common.SettingScanDoneEvent(frmDrvSettings_OnScanDoneDoNothing);
_alreadyScannedForPredefinedSettings = true;
_scanner.StartScanForPredefinedSettingsAsync();
}
private void ScanProfilesSilent(bool scanPredefined, bool showProfileDialog)
private async Task ScanProfilesSilentAsync(bool scanPredefined, bool showProfileDialog)
{
if (_skipScan)
{
if (scanPredefined && !_alreadyScannedForPredefinedSettings)
{
_alreadyScannedForPredefinedSettings = true;
_meta.ResetMetaCache();
tsbModifiedProfiles.Enabled = true;
exportUserdefinedProfilesToolStripMenuItem.Enabled = false;
RefreshCurrentProfile();
}
return;
}
tsbModifiedProfiles.Enabled = false;
tsbRefreshProfile.Enabled = false;
pbMain.Minimum = 0;
pbMain.Maximum = 100;
_scannerCancelationTokenSource = new CancellationTokenSource();
var progressHandler = new Progress<int>(value =>
{
pbMain.Value = value;
SetTaskbarProgress(value);
});
if (scanPredefined && !_alreadyScannedForPredefinedSettings)
StartPredefinedSettingsScan(true);
{
_alreadyScannedForPredefinedSettings = true;
await _scanner.ScanProfileSettingsAsync(false, progressHandler, _scannerCancelationTokenSource.Token);
_meta.ResetMetaCache();
tscbShowScannedUnknownSettings.Enabled = true;
}
else
StartModifiedProfilesScan(showProfileDialog);
{
await _scanner.ScanProfileSettingsAsync(true, progressHandler, _scannerCancelationTokenSource.Token);
}
RefreshModifiesProfilesDropDown();
tsbModifiedProfiles.Enabled = true;
pbMain.Value = 0;
pbMain.Enabled = false;
SetTaskbarProgress(0);
if (showProfileDialog)
{
ShowExportProfiles();
}
RefreshCurrentProfile();
tsbRefreshProfile.Enabled = true;
}
private void cbCustomSettingsOnly_CheckedChanged(object sender, EventArgs e)
@@ -805,7 +738,7 @@ namespace nspector
}
}
private void tsbRestoreProfile_Click(object sender, EventArgs e)
private async void tsbRestoreProfile_Click(object sender, EventArgs e)
{
if (Control.ModifierKeys == Keys.Control)
{
@@ -818,7 +751,7 @@ namespace nspector
RefreshProfilesCombo();
RefreshCurrentProfile();
ScanProfilesSilent(true, false);
await ScanProfilesSilentAsync(true, false);
cbProfiles.Text = GetBaseProfileName();
}
}
@@ -890,14 +823,14 @@ namespace nspector
}
}
private void frmDrvSettings_Shown(object sender, EventArgs e)
private async void frmDrvSettings_Shown(object sender, EventArgs e)
{
if (_isStartup)
{
new Thread(SetTaskbarIcon).Start();
ScanProfilesSilent(true, false);
await ScanProfilesSilentAsync(true, false);
if (WindowState != FormWindowState.Maximized)
if (_scannerCancelationTokenSource != null && !_scannerCancelationTokenSource.Token.IsCancellationRequested && WindowState != FormWindowState.Maximized)
{
new MessageHelper().bringAppToFront((int)this.Handle);
}
@@ -912,6 +845,9 @@ namespace nspector
if (MessageBox.Show(this, "Really delete all profiles?", "Delete all profiles", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
{
_drs.DeleteAllProfilesHard();
ChangeCurrentProfile(_baseProfileName);
DrsSessionScope.DestroyGlobalSession();
RefreshAll();
}
}
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)
@@ -984,7 +920,7 @@ namespace nspector
//{
// drs.DeleteApplication(currentProfile, e.ClickedItem.Text);
//}
_drs.DeleteApplication(_CurrentProfile, e.ClickedItem.Text);
_drs.RemoveApplication(_CurrentProfile, e.ClickedItem.Tag.ToString());
RefreshCurrentProfile();
}
@@ -1025,9 +961,9 @@ namespace nspector
tsbImportProfiles.ShowDropDown();
}
private void exportUserdefinedProfilesToolStripMenuItem_Click(object sender, EventArgs e)
private async void exportUserdefinedProfilesToolStripMenuItem_Click(object sender, EventArgs e)
{
ScanProfilesSilent(false, true);
await ScanProfilesSilentAsync(false, true);
}
private void ExportCurrentProfile(bool includePredefined)
@@ -1091,10 +1027,10 @@ namespace nspector
}
}
private void RefreshAll()
private async void RefreshAll()
{
RefreshProfilesCombo();
ScanProfilesSilent(true, false);
await ScanProfilesSilentAsync(true, false);
int idx = cbProfiles.Items.IndexOf(_CurrentProfile);
if (idx == -1 || _CurrentProfile == _baseProfileName)
@@ -1116,6 +1052,7 @@ namespace nspector
{
_import.ImportAllProfilesFromNvidiaTextFile(openDialog.FileName);
MessageBox.Show("Profile(s) successfully imported!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
DrsSessionScope.DestroyGlobalSession();
RefreshAll();
}
catch (NvapiException)
@@ -1146,7 +1083,7 @@ namespace nspector
cbProfiles.Select(cbProfiles.Text.Length, 0);
}
}
public static void ShowImportDoneMessage(string importReport)
{
@@ -1216,9 +1153,94 @@ namespace nspector
}
}
private void HandleScreenConstraints()
{
var workingArea = Screen.GetWorkingArea(this);
if (Left < workingArea.X)
Left = workingArea.X;
if (Top < workingArea.Y)
Top = workingArea.Y;
if ((Left + Width) > workingArea.X + workingArea.Width)
Left = (workingArea.X + workingArea.Width) - Width;
if ((Top + Height) > workingArea.Y + workingArea.Height)
Top = (workingArea.Y + workingArea.Height) - Height;
}
private void SaveSettings()
{
var settings = UserSettings.LoadSettings();
if (WindowState == FormWindowState.Normal)
{
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.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;
HandleScreenConstraints();
tscbShowCustomSettingNamesOnly.Checked = settings.ShowCustomizedSettingNamesOnly;
tscbShowScannedUnknownSettings.Checked = !_skipScan && settings.ShowScannedUnknownSettings;
}
private void frmDrvSettings_FormClosed(object sender, FormClosedEventArgs e)
{
_scannerCancelationTokenSource?.Cancel();
SaveSettings();
}
private void lvSettings_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.C)
{
CopyModifiedSettingsToClipBoard();
}
}
private void CopyModifiedSettingsToClipBoard()
{
var sbSettings = new StringBuilder();
sbSettings.AppendFormat("{0,-40} {1}\r\n", "### NVIDIA Profile Inspector ###", _CurrentProfile);
foreach (ListViewGroup group in lvSettings.Groups)
{
bool groupTitleAdded = false;
foreach (ListViewItem item in group.Items)
{
if (item.ImageIndex != 0) continue;
if(!groupTitleAdded)
{
sbSettings.AppendFormat("\r\n[{0}]\r\n", group.Header);
groupTitleAdded = true;
}
sbSettings.AppendFormat("{0,-40} {1}\r\n", item.Text, item.SubItems[1].Text);
}
}
Clipboard.SetText(sbSettings.ToString());
}
}
}

View File

@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADI
DAAAAk1TRnQBSQFMAgEBBAEAAZABBwGQAQcBEAEAARABAAT/ARkBAAj/AUIBTQE2BwABNgMAASgDAAFA
DAAAAk1TRnQBSQFMAgEBBAEAAagBBwGoAQcBEAEAARABAAT/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 @@
<data name="tsbRefreshProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGgSURBVDhPrZPLSsNAFIb7BoKP4Upw5UoQBHfmMrG1olCa
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAGgSURBVDhPrZPLSsNAFIb7BoKP4Upw5UoQBHfmMrG1olCa
pFoExY2KiHcRERFEwYUKglSQesFeQK2rFkFr0Y26MRAKpa2+QS+/MzGpaS114wdhQv7/nDknZ8bx7xDi
a+FFeYvnFU2QFHCcRxdEOcQTmTctjWHB4UgM2Wwe5XIZ+fwnko/PWF3bhiAqJzRRp2mtD0/U7oWlTbAK
Bj1jYO/vmo5SqYR44gG9fcPgiNpu2uvDkrCVEG+zIMkqcfqQuEuiWCwidhsHJ8qHhtEOLX2H9cxW81MF
@@ -208,7 +208,7 @@
<data name="tsbRestoreProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFcSURBVDhP3VFNK0RhFL4/wNbM3PdcCgsfsbHDgkJKWPgD
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAFcSURBVDhP3VFNK0RhFL4/wNbM3PdcCgsfsbHDgkJKWPgD
ilJGNN73XEs/gbKUmvITuPc9d5iwYKfZyULZ26BkhTjnnXs1TWTNqafOx/M895z3ev84FsrwigQfvyGl
1yNM1IyO4cQNrUKdqGFj1awmuGgWZnDC9Wouz8U1xnATkj+oE78HLVyWKPeAlH9EUkOa1FyzWOAxeVIS
JuxtRoVeERhS51zviLlsIHNjYRltW1ejWOChDdbqhEIfRoVbE0PZbXXoP3G/ygZFNyeYZ4xlwgzC9fAI
@@ -220,7 +220,7 @@
<data name="tsbCreateProfile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEgSURBVDhP3Y/PKwRhHIf3f5g/wMWUlIuDUk5y5MCB3Dk4
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAEgSURBVDhP3Y/PKwRhHIf3f5g/wMWUlIuDUk5y5MCB3Dk4
7EUbBwdXJ3EXsksjidlk2x27NrXt5kdjlTQXbSFK2iaGaX7s491Zjppx5FNP7/et9/n0fmP/PFwu8JGd
5OsaLdxpNIyVQPL1GcyDwWDmVsEx1sLLGvdHeLtduKVh/GIPTlbGPRvF3mmjXm0Vh8a9SEBGAl1gCMoS
j2p/uOyX5/AK4/i5bqgI8UrQPFUJO9mOr43gHk/9XOToy9QLCd4O+yAvxCb7gg0JK9WJqcWxTubDf+Kd
@@ -237,7 +237,7 @@
<data name="toolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
@@ -252,7 +252,7 @@
<data name="toolStripButton6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc

View File

@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>nspector</RootNamespace>
<AssemblyName>nvidiaProfileInspector</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PlatformTarget>x86</PlatformTarget>
<TargetFrameworkProfile />
@@ -135,12 +135,14 @@
<Compile Include="Common\DrsSessionScope.cs" />
<Compile Include="Common\DrsSettingsMetaService.cs" />
<Compile Include="Common\DrsUtil.cs" />
<Compile Include="Common\Helper\DropDownMenuScrollWheelHandler.cs" />
<Compile Include="Common\Helper\ListViewGroupSorter.cs" />
<Compile Include="Common\Helper\ShortcutResolver.cs" />
<Compile Include="Common\Helper\SteamAppResolver.cs" />
<Compile Include="Common\Helper\TempFile.cs" />
<Compile Include="Common\Helper\UserSettings.cs" />
<Compile Include="Common\Import\ImportExportUitl.cs" />
<Compile Include="Common\Import\SettingValueType.cs" />
<Compile Include="Common\Meta\NvD3dUmxSettingMetaService.cs" />
<Compile Include="Common\Meta\MetaServiceItem.cs" />
<Compile Include="Common\Meta\ConstantSettingMetaService.cs" />
<Compile Include="Common\Meta\CustomSettingMetaService.cs" />
@@ -224,9 +226,6 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>