fixed final content type issues and message form width

This commit is contained in:
Vincent Maas committed 2023-06-28 10:35:40 +02:00
1 parent bc102334c8
commit 966b8336de
5 files changed
+22 -10

No files matched your search

+2 -2
View File
@@ -18,8 +18,8 @@
<PublisherName>Maassoft</PublisherName>
<Company>Maassoft</Company>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>9.6.0.0</ApplicationVersion>
<Version>9.6.0.0</Version>
<ApplicationVersion>9.6.1.0</ApplicationVersion>
<Version>9.6.1.0</Version>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>false</BootstrapperEnabled>
+1 -1
View File
@@ -1014,7 +1014,7 @@ NOTE: installing the service may cause a User Account Control popup.");
private async Task CheckForUpdates()
{
if (!_config.CheckForUpdates || _checkedForUpdates || Debugger.IsAttached)
if (!_config.CheckForUpdates || _checkedForUpdates/* || Debugger.IsAttached*/)
{
return;
}
+4 -3
View File
@@ -712,14 +712,15 @@ namespace ColorControl.Services.NVIDIA
infoValue.SetContentType(contentType);
displayDevice.SetHDMIVideoFrameInformation(infoValue);
displayDevice.SetHDMIVideoFrameInformation(infoValue, true);
}
}
public InfoFrameVideoContentType GetHDMIContentType(Display display)
{
var displayDevice = display.DisplayDevice;
var info = displayDevice.HDMIVideoFrameCurrentInformation;
var info = displayDevice.HDMIVideoFrameOverrideInformation ?? displayDevice.HDMIVideoFrameCurrentInformation;
return info.HasValue ? info.Value.ContentType : InfoFrameVideoContentType.Auto;
}
@@ -989,7 +990,7 @@ namespace ColorControl.Services.NVIDIA
_settings.AddRange(normalSettings);
_driverSettingIds.Clear();
_driverSettingIds.AddRange(_settings.Where(s => !s.IsStringValue && !s.SettingText.Contains("SLI")).Select(s => s.SettingId));
_driverSettingIds.AddRange(_settings.Where(s => !s.IsStringValue && !s.SettingText.Contains("SLI") && s.GroupName != null && s.GroupName != "Unknown").Select(s => s.SettingId));
if (firstTime)
{
+11 -3
View File
@@ -644,7 +644,7 @@ namespace nspector.Native.NVAPI2
NvAPI_Status res;
var settingIdArray = new uint[maxCount];
var pSettingIds = IntPtr.Zero;
NativeArrayHelper.SetArrayData(settingIdArray, out pSettingIds);
NativeArrayHelper.SetArrayDataNative(settingIdArray, out pSettingIds);
try
{
res = DRS_EnumAvailableSettingIdsInternal(pSettingIds, ref maxCount);
@@ -662,9 +662,17 @@ namespace nspector.Native.NVAPI2
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate NvAPI_Status DRS_EnumAvailableSettingValuesDelegate(uint settingId, ref uint pMaxNumValues, IntPtr pSettingValues);
private static readonly DRS_EnumAvailableSettingValuesDelegate DRS_EnumAvailableSettingValuesInternal;
[ThreadStatic]
private static IntPtr pSettingValues;
public static NvAPI_Status DRS_EnumAvailableSettingValues(uint settingId, ref uint pMaxNumValues, ref NVDRS_SETTING_VALUES settingValues)
{
var pSettingValues = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NVDRS_SETTING_VALUES)));
if (pSettingValues == IntPtr.Zero)
{
pSettingValues = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NVDRS_SETTING_VALUES)));
}
NvAPI_Status res;
try
{
@@ -675,7 +683,7 @@ namespace nspector.Native.NVAPI2
}
finally
{
Marshal.FreeHGlobal(pSettingValues);
//Marshal.FreeHGlobal(pSettingValues);
}
return res;
}
+4 -1
View File
@@ -143,6 +143,7 @@ namespace ColorControl.Shared.Forms
var top = 10;
var boxes = new List<Control>();
var labels = new List<Label>();
var counter = 1;
const int DefaultLeft = 20;
var currentLeft = DefaultLeft;
@@ -159,6 +160,7 @@ namespace ColorControl.Shared.Forms
if (field.FieldType != FieldType.CheckBox)
{
var textLabel = new Label() { Left = currentLeft, Top = top, Text = label, AutoSize = true };
labels.Add(textLabel);
top += 20;
groupBox.Controls.Add(textLabel);
}
@@ -166,6 +168,7 @@ namespace ColorControl.Shared.Forms
if (field.SubLabel != null)
{
var textSubLabel = new Label() { Left = currentLeft, Top = top, Text = field.SubLabel, AutoSize = true };
labels.Add(textSubLabel);
top += 20;
groupBox.Controls.Add(textSubLabel);
}
@@ -369,7 +372,7 @@ namespace ColorControl.Shared.Forms
counter++;
}
var maxWidth = boxes.Max(c => c.Width + c.Left) + 36;
var maxWidth = Math.Max(boxes.Max(c => c.Width + c.Left), labels.Max(l => l.Width + l.Left)) + 36;
if (groupBox.Width < maxWidth)
{