Removed prior graphics libraries to enable new lib integration.

Tweaked some easy to fix integration errors.
This commit is contained in:
Terry MacDonald 2021-08-21 22:09:41 +12:00
parent 224b666bba
commit a4662bed6c
4 changed files with 14 additions and 30 deletions

View File

@ -262,7 +262,7 @@
<Version>4.0.0-alpha5</Version> <Version>4.0.0-alpha5</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Autoupdater.NET.Official"> <PackageReference Include="Autoupdater.NET.Official">
<Version>1.6.4</Version> <Version>1.7.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="BootMeUp"> <PackageReference Include="BootMeUp">
<Version>1.2.0</Version> <Version>1.2.0</Version>
@ -271,10 +271,10 @@
<Version>2.8.0.16</Version> <Version>2.8.0.16</Version>
</PackageReference> </PackageReference>
<PackageReference Include="EDIDParser"> <PackageReference Include="EDIDParser">
<Version>1.2.0.1</Version> <Version>1.2.5.4</Version>
</PackageReference> </PackageReference>
<PackageReference Include="HtmlAgilityPack"> <PackageReference Include="HtmlAgilityPack">
<Version>1.11.33</Version> <Version>1.11.36</Version>
</PackageReference> </PackageReference>
<PackageReference Include="IconLib.Unofficial"> <PackageReference Include="IconLib.Unofficial">
<Version>0.73.0</Version> <Version>0.73.0</Version>
@ -286,10 +286,10 @@
<Version>13.8.2</Version> <Version>13.8.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="McMaster.Extensions.CommandLineUtils"> <PackageReference Include="McMaster.Extensions.CommandLineUtils">
<Version>3.1.0</Version> <Version>4.0.0-beta.74</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications"> <PackageReference Include="Microsoft.Toolkit.Uwp.Notifications">
<Version>7.0.2</Version> <Version>7.1.0-preview1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="MintPlayer.IconUtils"> <PackageReference Include="MintPlayer.IconUtils">
<Version>1.0.4</Version> <Version>1.0.4</Version>
@ -304,7 +304,7 @@
<Version>2.1.0</Version> <Version>2.1.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="NLog"> <PackageReference Include="NLog">
<Version>4.7.10</Version> <Version>4.7.11</Version>
</PackageReference> </PackageReference>
<PackageReference Include="QueryString.NET"> <PackageReference Include="QueryString.NET">
<Version>1.0.0</Version> <Version>1.0.0</Version>

View File

@ -41,17 +41,7 @@ namespace DisplayMagician
#region Class Constructors #region Class Constructors
static ShortcutRepository() static ShortcutRepository()
{ {
try
{
NvAPIWrapper.NVIDIA.Initialize();
}
catch (Exception ex)
{
logger.Warn(ex, $"ShortcutRepository/ShortcutRepository: Initialising NVIDIA NvAPIWrapper or CoreAudioController caused an exception.");
}
try try
{ {
_audioController = new CoreAudioController(); _audioController = new CoreAudioController();
@ -63,7 +53,6 @@ namespace DisplayMagician
// Load the Shortcuts from storage // Load the Shortcuts from storage
LoadShortcuts(); LoadShortcuts();
} }
#endregion #endregion

View File

@ -247,11 +247,11 @@ namespace DisplayMagicianShared.NVIDIA
public override bool CreateProfileFromCurrentDisplaySettings() public override bool CreateProfileFromCurrentDisplaySettings()
{ {
AMDLibrary amdLibrary = AMDLibrary.GetLibrary(); NVIDIALibrary nvidiaLibrary = NVIDIALibrary.GetLibrary();
if (amdLibrary.IsInstalled) if (nvidiaLibrary.IsInstalled)
{ {
// Create the profile data from the current config // Create the profile data from the current config
_displayConfig = amdLibrary.GetActiveConfig(); _displayConfig = nvidiaLibrary.GetActiveConfig();
// Now, since the ActiveProfile has changed, we need to regenerate screen positions // Now, since the ActiveProfile has changed, we need to regenerate screen positions
_screens = GetScreenPositions(); _screens = GetScreenPositions();

View File

@ -5,17 +5,11 @@ using System.Drawing.IconLib;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using WindowsDisplayAPI.DisplayConfig;
using NvAPIWrapper.Mosaic;
using NvAPIWrapper.Native.Mosaic;
using WindowsDisplayAPI;
using System.Diagnostics; using System.Diagnostics;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using NvAPIWrapper.Native.GPU;
using DisplayMagicianShared.AMD; using DisplayMagicianShared.AMD;
using DisplayMagicianShared.NVIDIA; using DisplayMagicianShared.NVIDIA;
using DisplayMagicianShared.Windows; using DisplayMagicianShared.Windows;
using System.Windows.Forms;
namespace DisplayMagicianShared namespace DisplayMagicianShared
{ {
@ -33,6 +27,7 @@ namespace DisplayMagicianShared
private static List<string> _connectedDisplayIdentifiers = new List<string>(); private static List<string> _connectedDisplayIdentifiers = new List<string>();
private static bool notifiedEDIDErrorToUser = false; private static bool notifiedEDIDErrorToUser = false;
private static AMDLibrary AMDLibrary; private static AMDLibrary AMDLibrary;
private static NVIDIALibrary NVIDIALibrary;
//private static bool _isLoading = false; //private static bool _isLoading = false;
// Other constants that are useful // Other constants that are useful
@ -52,12 +47,12 @@ namespace DisplayMagicianShared
// Initialise the the NVIDIA NvAPIWrapper // Initialise the the NVIDIA NvAPIWrapper
try try
{ {
SharedLogger.logger.Debug($"ProfileRepository/ProfileRepository: Initialising the NvAPIWrapper.NVIDIA library."); SharedLogger.logger.Debug($"ProfileRepository/ProfileRepository: Initialising the NVIDIA NVAPI library.");
NvAPIWrapper.NVIDIA.Initialize(); NVIDIALibrary = new NVIDIALibrary();
} }
catch (Exception ex) catch (Exception ex)
{ {
SharedLogger.logger.Warn(ex, $"ProfileRepository/ProfileRepository: Initialising NVIDIA NvAPIWrapper caused an exception."); SharedLogger.logger.Warn(ex, $"ProfileRepository/ProfileRepository: Initialising NVIDIA NVAPI caused an exception.");
} }
// Initialise the the AMD ADLWrapper // Initialise the the AMD ADLWrapper