mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-18 23:07:15 -05:00
remove Nvapi dependency when reading EDID, replace debug version of lcms2.dll with release version
This commit is contained in:
1 parent
5611c1bea7
commit
c958e6cb04
4 files changed
+21
-5
No files matched your search
@@ -18,8 +18,8 @@
|
||||
<PublisherName>Maassoft</PublisherName>
|
||||
<Company>Maassoft</Company>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>9.8.0.0</ApplicationVersion>
|
||||
<Version>9.8.0.0</Version>
|
||||
<ApplicationVersion>9.8.0.1</ApplicationVersion>
|
||||
<Version>9.8.0.1</Version>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>false</BootstrapperEnabled>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
using ColorControl.Shared.Forms;
|
||||
using ColorControl.Shared.Native;
|
||||
using ColorControl.Shared.XForms;
|
||||
using EDIDParser;
|
||||
using MHC2Gen;
|
||||
using novideo_srgb;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -231,7 +232,7 @@ internal class ColorProfileViewModel : BaseViewModel
|
||||
|
||||
var path = SelectedDisplay.DevicePath;
|
||||
|
||||
var edid = Novideo.GetEDID(path, null);
|
||||
var edid = GetEDIDInternal(path);
|
||||
var primaries = edid?.DisplayParameters?.ChromaticityCoordinates;
|
||||
|
||||
if (primaries == null)
|
||||
@@ -257,4 +258,19 @@ internal class ColorProfileViewModel : BaseViewModel
|
||||
new CIExy { x = BluePoint.X, y = BluePoint.Y },
|
||||
new CIExy { x = WhitePoint.X, y = WhitePoint.Y });
|
||||
}
|
||||
|
||||
private static EDID GetEDIDInternal(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
var registryPath = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\DISPLAY\\";
|
||||
registryPath += string.Join("\\", path.Split('#').Skip(1).Take(2));
|
||||
return new EDID((byte[])Registry.GetValue(registryPath + "\\Device Parameters", "EDID", null));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -41,7 +41,7 @@ namespace ColorControl.XForms
|
||||
{
|
||||
if (Application.Current == null)
|
||||
{
|
||||
new Application();
|
||||
new Application { ShutdownMode = ShutdownMode.OnExplicitShutdown };
|
||||
}
|
||||
|
||||
var window = Program.ServiceProvider.GetRequiredService<ColorProfileWindow>();
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user