Skip to content

Commit

Permalink
NVAPI R570 + .NET FW 4.8.1 + small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbmu2k committed Feb 7, 2025
1 parent 332153b commit 7eca55a
Show file tree
Hide file tree
Showing 8 changed files with 543 additions and 197 deletions.
23 changes: 20 additions & 3 deletions nspector/Common/DrsServiceLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ internal class DrsServiceLocator
public static readonly DrsScannerService ScannerService;
public static readonly DrsDecrypterService DecrypterService;

public static bool IsExternalCustomSettings { get; private set; } = false;

static DrsServiceLocator()
{
CustomSettings = LoadCustomSettings();
Expand All @@ -31,7 +33,18 @@ private static CustomSettingNames LoadCustomSettings()
string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\CustomSettingNames.xml";

if (File.Exists(csnDefaultPath))
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
{
try
{
var externalSettings = CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
IsExternalCustomSettings = true;
return externalSettings;
}
catch
{
return CustomSettingNames.FactoryLoadFromString(Properties.Resources.CustomSettingNames);
}
}
else
return CustomSettingNames.FactoryLoadFromString(Properties.Resources.CustomSettingNames);
}
Expand All @@ -40,8 +53,12 @@ private static CustomSettingNames LoadReferenceSettings()
{
string csnDefaultPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\Reference.xml";

if (File.Exists(csnDefaultPath))
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
try
{
if (File.Exists(csnDefaultPath))
return CustomSettingNames.FactoryLoadFromFile(csnDefaultPath);
}
catch { }

return null;
}
Expand Down
297 changes: 229 additions & 68 deletions nspector/Native/NVAPI/NvApiDriverSettings.cs

Large diffs are not rendered by default.

385 changes: 276 additions & 109 deletions nspector/Native/NVAPI/NvApiDriverSettings.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nspector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NVIDIA Profile Inspector")]
[assembly: AssemblyCopyright(2022 by Orbmu2k")]
[assembly: AssemblyCopyright(2025 by Orbmu2k")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
26 changes: 13 additions & 13 deletions nspector/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nspector/app.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/></startup></configuration>
3 changes: 2 additions & 1 deletion nspector/frmDrvSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ private void SetTitleVersion()
var numberFormat = new NumberFormatInfo() { NumberDecimalSeparator = "." };
var version = Assembly.GetExecutingAssembly().GetName().Version;
var fileVersionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
Text = $"{Application.ProductName} {version} - Geforce {_drs.DriverVersion.ToString("#.00", numberFormat)} - Profile Settings - {fileVersionInfo.LegalCopyright}";
var externalCsn = DrsServiceLocator.IsExternalCustomSettings ? " - CSN OVERRIDE!" : "";
Text = $"{Application.ProductName} {version} - Geforce {_drs.DriverVersion.ToString("#.00", numberFormat)} - Profile Settings - {fileVersionInfo.LegalCopyright}{externalCsn}";
}

private static void InitMessageFilter(IntPtr handle)
Expand Down
2 changes: 1 addition & 1 deletion nspector/nvidiaProfileInspector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>nspector</RootNamespace>
<AssemblyName>nvidiaProfileInspector</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PlatformTarget>x86</PlatformTarget>
<TargetFrameworkProfile />
Expand Down

0 comments on commit 7eca55a

Please sign in to comment.