mirror of
https://github.com/Orbmu2k/nvidiaProfileInspector.git
synced 2026-01-14 09:48:34 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffff16ca83 | ||
|
|
cd8caa5702 | ||
|
|
2d57d6b885 |
12
README.md
12
README.md
@@ -1 +1,11 @@
|
||||
# nvidiaProfileInspector
|
||||
 **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
|
||||
|
||||

|
||||
|
||||
BIN
npi_screenhshot .png
Normal file
BIN
npi_screenhshot .png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
@@ -449,7 +449,7 @@ namespace nspector.Common
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
@@ -482,7 +482,7 @@ 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);
|
||||
|
||||
});
|
||||
|
||||
@@ -499,24 +499,25 @@ 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}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
@@ -913,7 +914,7 @@ namespace nspector
|
||||
//{
|
||||
// drs.DeleteApplication(currentProfile, e.ClickedItem.Text);
|
||||
//}
|
||||
_drs.DeleteApplication(_CurrentProfile, e.ClickedItem.Text);
|
||||
_drs.RemoveApplication(_CurrentProfile, e.ClickedItem.Tag.ToString());
|
||||
RefreshCurrentProfile();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user