Skip to content

Commit

Permalink
fix some final issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Maassoft committed Aug 2, 2024
1 parent 4ed670c commit 18f32e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,10 @@

protected async Task LoadDriverSettings()
{
if (DriverSettings == null)
DriverSettings = await _rpcClientService.CallAsync<List<NvSettingItemDto>>("NvService", "GetDriverSettings", CurrentProfileName);
if (DriverSettings != null)
{
DriverSettings = await _rpcClientService.CallAsync<List<NvSettingItemDto>>("NvService", "GetDriverSettings", CurrentProfileName);
if (DriverSettings != null)
{
DriverSettings.ForEach(s => s.ValueChanged = false);
}
DriverSettings.ForEach(s => s.ValueChanged = false);
}

if (DriverSettings != null)
Expand Down
5 changes: 4 additions & 1 deletion Shared/Contracts/NVIDIA/NvHdrSettings.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using System.Text.Json.Serialization;
using System.ComponentModel;
using System.Text.Json.Serialization;

namespace ColorControl.Shared.Contracts.NVIDIA
{
public enum NvOutputMode
{
Default = 0,
[Description("HDR10")]
Hdr10 = 1,
[Description("HDR10+")]
Hdr10Plus = 2
}

Expand Down
2 changes: 1 addition & 1 deletion Shared/Contracts/NVIDIA/NvPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void UpdateAutoApplySettings(NvPreset currentSettings = null, bool keepCh

applyColorData = keepChanges && applyColorData || colorData.IsDifferent(currentSettings.colorData);
applyDithering = keepChanges && applyDithering || (ditheringEnabled != currentSettings.ditheringEnabled || ditheringMode != currentSettings.ditheringMode || ditheringBits != currentSettings.ditheringBits);
applyHDR = keepChanges && applyHDR || (HDREnabled != currentSettings.HDREnabled || toggleHDR || SDRBrightness != currentSettings.SDRBrightness);
applyHDR = keepChanges && applyHDR || (HDREnabled != currentSettings.HDREnabled || toggleHDR || SDRBrightness != currentSettings.SDRBrightness || HdrSettings.OutputMode != currentSettings.HdrSettings.OutputMode);
DisplayConfig.ApplyResolution = keepChanges && DisplayConfig.ApplyResolution || (DisplayConfig.Resolution.IsDifferent(currentSettings.DisplayConfig.Resolution) ||
DisplayConfig.Scaling != currentSettings.DisplayConfig.Scaling || DisplayConfig.Rotation != currentSettings.DisplayConfig.Rotation || DisplayConfig.IsPrimary != null && DisplayConfig.IsPrimary != currentSettings.DisplayConfig.IsPrimary);
DisplayConfig.ApplyRefreshRate = keepChanges && DisplayConfig.ApplyRefreshRate || !DisplayConfig.RefreshRate.Equals(currentSettings.DisplayConfig.RefreshRate);
Expand Down

0 comments on commit 18f32e1

Please sign in to comment.